sshのデフォルトでは未知のホストに対してユーザーに確認を求めるが,めんどくさい.
自動化するときなどにいちいち尋ねれたくないときは、StrictHostKeyChecking を no にする.
~~~sh
#通常.yes/noを答えてパスワードを入力
$ ssh 192.xxx.xxx.xxx
The authenticity of host '192.xxx.xxx.xxx (192.xxx.xxx.xxx)' can't be established.
RSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx.
Are you sure you want to continue connecting (yes/no)?
~~~
~~~sh
#StrictHostKeyChecking=no でyes/noをきかれない
$ ssh -oStrictHostKeyChecking=no 192.xxx.xxx.xxx
Warning: Permanently added '192.xxx.xxx.xxx' (RSA) to the list of known hosts.
root@192.xxx.xxx.xxx's password:
~~~
コメント (0)
あなたもコメントしてみませんか
アカウント新規作成(無料)
既にアカウントを持っている方は
ログイン