如果你只是想登陆别的机器的SSH只需要安装openssh-client(ubuntu有默认安装,如果没有则sudoapt-get install openssh-client),如果要使本机开放SSH服务就需要安装openssh-server。
- 安装openssh-server - 1 - sudo apt-get install openssh-server 
- 修改 root 密码 - 1 - sudo passwd root 
- 修改配置文件 - 1 - sudo vi /etc/ssh/sshd_config - 找到下面相关配置: - 1 
 2
 3
 4- # Authentication: 
 LoginGraceTime 120
 PermitRootLogin prohibit-password
 StrictModes yes- 更改为: - 1 
 2
 3
 4
 5- # Authentication: 
 LoginGraceTime 120
 #PermitRootLogin prohibit-password
 PermitRootLogin yes
 StrictModes yes
- 重启ssh - 1 - sudo service ssh restart