Linux下的ssh命令是OpenSSH的客户端程序。要登录远程Linux系统,必须保证远程Linux系统上启动了OpenSSH服务器,使用ssh命令登录远程OpenSSH服务器的命令格式是:
$ ssh 远程主机上的用户@远程主机的IP地址或FQDN
下面给出一个使用ssh命令登录远程Linux系统的操作步骤。以下为在Linux环境下使用ssh命令登录远程CentOS系统的示例。
## 以root身份登录IP地址为192.168.0.101的CentOS系统
osmond@ubuntu:~$ ssh root@192.168.0.101
The authenticity of host ‘192.168.0.101(192.168.0.101)' can't be established.
RSA key fingerprint is 6e:62:70:0a:b9:d7:fe11:7f:78:b0:af:28:69:7c.
Are you sure you want to continue connecting (yes/no)? yes
## 如果第一次使用该帐号进行ssh登录需确认密钥,选择yes才可继续登录过程
Warning: Permanently added '192.168.0.101' (RSA) to the list of known hosts.
root@192.168.0.101's password:
## 在此输入root用户在主机192.168.0.101上的口令,口令输入过程中没有回显
Last login: Sun Dec 9 01:18:13 2007
[root@cnetos5 ~] #
## 正确登录后出现Shell提示符
[root@cnetos5 ~] # logout
## 输入logout命令注销远程连接
Connection to 192.168.0.101 closed.
osmond@ubuntu:~$
## 返回本地Shell
circletiger 于 2012-04-02 12:58:12发表:
学习了。谢谢分享。