安裝服務(wù)器端的openssh
- 安裝 open ssh:
- 輯配置文件,允許以 root 用戶(hù)通過(guò) ssh 登錄:
sudo vi /etc/ssh/sshd_config
找到:PermitRootLogin prohibit-password禁用
添加:PermitRootLogin yes
執(zhí)行命令:sudo service ssh restart
安裝openssh-server過(guò)程中顽耳,如若出現(xiàn)以下提示:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package openssh-server is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
這個(gè)問(wèn)題的原因是ubuntu的/etc/apt/source.list中的源比較舊了绒净,需要更新一下锄奢,更新方法:
$ sudo apt-get -y update