限られた範囲のリモートコマンドを実行できません。

限られた範囲のリモートコマンドを実行できません。

ユーザー(scriptsser)用にマシンAに制限されたbashを設定し、次のように必須コマンドへのシンボリックリンクを作成しました。

lrwxrwxrwx. 1 root root 10 Nov 28 08:09 touch -> /bin/touch
lrwxrwxrwx. 1 root root  8 Nov 28 08:09 ssh -> /bin/ssh
lrwxrwxrwx. 1 root root  7 Dec 18 07:44 mv -> /bin/mv

すべてがうまくいきます。そのユーザー(scriptsser)を使用してマシンAにログインすると、次のコマンドを使用できます。

私の問題は、リモートコンピュータでコマンドを実行しようとしたときに始まります。

ssh scriptsser@MachineA -i /home/scriptsser/.ssh/id_rsa  "mv /file1 /file2" ;

次のエラーメッセージが表示されます。

rbash: /bin/rbash: 制限: コマンド名に '/' を指定できません。

私がここで何を見逃しているのでしょうか?

ベストアンサー1

ユーザー「scriptsser」のauthenticate_keysに「/bin/rbash」が設定されていることに気づきました。

おすすめ記事