安装服务器端的openssh
- 安装 open ssh:
- 辑配置文件,允许以 root 用户通过 ssh 登录:
sudo vi /etc/ssh/sshd_config
找到:PermitRootLogin prohibit-password禁用
添加:PermitRootLogin yes
执行命令:sudo service ssh restart
安装openssh-server过程中,如若出现以下提示:
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
这个问题的原因是ubuntu的/etc/apt/source.list中的源比较旧了,需要更新一下,更新方法:
$ sudo apt-get -y update
网友评论