LoginSignup
0
0

More than 5 years have passed since last update.

vulsでのリモートスキャン対象ホストが、sshd_configでForceCommand が設定されているとエラーが出る

Posted at

vulsでのリモートスキャン対象ホストが、ForceCommand が設定されているとエラーが出る

ssh接続でのコマンドを記録したり、接続コマンドを制限して、ForceCommandでシェルをかましているケースは多いと思います。

そんなホストにスキャンをかけると様々なエラーが出ます。
Unknown OS Type みたいな感じで。

解決方法

vuls稼働ホスト(ローカルIP)の時だけ、ForceCommandを無効にしましょう

/etc/ssh/sshd_config
ForceCommand /usr/bin/sshlog/shell

Match Address xxx.xxx.xxx.xxx
    ForceCommand none

設定を変更したら、sshdを再起動しましょう

service sshd restart

結論

OpenSSHのMatchディレクティブは便利

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0