# ssh [-l login-name] hostname | login-name@hostname
可用于登录远程系统的非缺省用户名
远程系统的名称
如果验证了系统的主机密钥,则将提示用户输入口令。如果口令键入不正确,则将再次提示用户输入口令。
如果登录系统成功,则将显示有关用户上次远程登录系统的信息。显示的信息可能包括远程系统上运行的操作系统的版本,最近的失败登录尝试次数,以及有关等待用户起始目录中用户的新电子邮件的通知。
使用以下命令之一注销远程系统:
exit
logout
Control-D
以下示例显示远程登录到 pluto 的输出。未在 /etc/ssh_known_hosts 文件或 ~/.ssh/known_hosts 文件中标识系统的主机密钥。用户在第一次尝试时键入了不正确的口令。
# ssh -l amy pluto The authenticity of host 'pluto (10:120:100:12)' can't be established. RSA key fingerprint is 06:55:4d:4e:d2:4a:e6:d9:8a:c4:13:15:18:9a:ef:dd. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'pluto' (RSA) to the list of known hosts. Password: Password: Warning: 1 failed authentication attempt at Wed Jun 27 12:47 2012 since last successful authentication. Last login: Wed Jun 27 12:19:04 2012 from venus.example Oracle Corporation SunOS 5.11 11.1 June 2012 # exit