
Arcom Embedded Linux Technical Manual Secure Shell (SSH)
Using SSH commands
The ssh command
The ssh command enables you to remotely login to a machine. For example to login to
the machine ael.example.net, you would enter the following command:
$ ssh ael.example.net
The first time you login to a machine, a message similar to the following (but with a
different fingerprint) is displayed:
The authenticity of host 'ael.example.net (10.2.4.14)' can't be
established.
RSA key fingerprint is
e0:79:67:58:78:e4:bc:0a:6a:e2:f8:62:f8:62:f8:ea:fa:bc
Are you sure you want to continue connecting (yes/no)?
This gives you the opportunity to verify that the machine you are logging into is the
machine you are expecting by confirming that the host’s cryptographic key is correct.
Verify that the fingerprint is correct before typing yes to continue logging in.
You can obtain the host fingerprint of a system by asking the administrator or by logging
in at the console and running the command:
$ ssh-keygen –l –f /etc/sshd/ssh_host_key.pub
There are likely to be several ssh_host_*key.pub files. Examine them all.
Once you verify the fingerprint of a system, it is written to ~/.ssh/known_hosts, so you
are not asked this question again. If the remote host’s fingerprint changes for any
reason, ssh displays an error message. If, on investigation, you determine that the
change is legitimate, you can edit ~/.ssh/known_hosts to remove the incorrect
fingerprint. For example, the remote operating system may be reinstalled, causing the
SSH server’s host key to change.
After you have accepted the remote system’s fingerprint, you are asked to authenticate
yourself. You normally do this by entering your password. However, there are
alternative authentication methods, such as public key authentication. See Public key
authentication methods
, page 27.
The ssh command logs in to the remote machine using the current user name from
your local host. To login as a different user, for example as the user ‘arcom’, you may
use one of these two command forms:
$ ssh –l arcom ael.example.net
Many of the commands in the SSH suite accept both these forms for specifying
a login user. The examples in this manual use the user@host form.
© 2006 Arcom Issue G 25
Comentários a estes Manuais