Ubuntu系统16.04新安装时候是不带ssh服务的,需要自己安装
(1)安装vim
新安装的ubuntu系统是不带vim:
sudo apt-get install vim
(2)安装openssh
sudo apt-get install openssh-server
(3)配置sshd_config文件
sudo vi /etc/ssh/sshd_config
PermitRootLogin prohibit-password禁用(前面加#号禁用)
PermitRootLogin yes
sudo service ssh restart
开机自动启动ssh命令
sudo systemctl enable ssh(或者图形界面sudo sysv-rc-conf也可以)
关闭开机自启动
sudo systemctl disable ssh
单次开启ssh
sudo systemctl start ssh
单次关闭ssh
sudo systemctl stop ssh
reboot
sudo systemctl status ssh