Apollo Connecting the World

Diligence and Intelligence

Do not type “yes” or “no” when newly ssh to a remote machine

leave a comment »

Ssh to a remote machine usually will prompt to ask you whether are sure to connect, like the following:
The authenticity of host ‘192.168.1.1 (192.168.1.1)’ can’t be established.
RSA key fingerprint is ********.
Are you sure you want to continue connecting (yes/no)?

You have to type “yes” each time you connect to a new remote machine. There is one mechod to avoid this step.

Open a terminal, type in command:
$echo “StrictHostKeyChecking no” >> ~/.ssh/config
$chmod 644 ~/.ssh/config            // note that the permission of file config matters

That is, creating a file named “config” under directory “~/.ssh”, and the content is “StrictHostkeyChecking no”.

You will not have to type yes again every time you ssh to a new remote machine.

Written by apollozhao

2010/03/03 at 13:28

Posted in Linux, ssh

Tagged with , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: