当前位置:   article > 正文

sudo apt-get install openssh-server 需要安装 sudo apt-get update 404错误解决办法 The authenticity of_sudo apt-server

sudo apt-server
Ubuntu 11.04 (Natty) 已经停止支持,但可以使用old-releases源了,先备份源列表文件:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

sudo gedit /etc/apt/sources.list
把里面的内容替换为以下内容:
deb http://old-releases.ubuntu.com/ubuntu/ natty main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ natty-security main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ natty-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ natty-proposed main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ natty-backports main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ natty main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ natty-security main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ natty-updates main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ natty-proposed main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ natty-backports main restricted universe multiverse

重载源列表,使配置生效:
sudo apt-get update

安装SSH服务器和客户端:

sudo apt-get install openssh-server openssh-client



源文:http://www.oschina.net/question/813663_115809





1,检查服务是否启动:
ps -ef| grep sshd

如果只有ssh-agent那ssh-server还没有启动,
需要/etc/init.d/ssh start,
如果看到sshd那说明ssh-server已经启动了。

2,master配置免密码:
ssh-keygen -t dsa -P ‘’ -f ~/.ssh/id_dsa
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

3,ssh slave1 连接The authenticity of host can't be established错误:
修改/etc/ssh/ssh_config文件的配置,以后则不会再出现此问题
最后面添加:
StrictHostKeyChecking no
UserKnownHostsFile /dev/null

4,ssh slave1 提示输入密码时输入slave1的密码  变成root@slave1  
敲命令ssh master 提示输入密码时输入master的密码变成root@master

-----ssh配置连通成功


声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号