putty 连接linux失败---解决方案
2015-12-05 21:38
519 查看
在VMware中安装Ubuntu之后,主机可以ping通虚拟机,想用putty来连接,结果返回: Authentication refused。
如下为解决方案:
1.在Ubuntu上查看ssh服务是否开启, ps -ef|grep ssh
2.发现没有开启ssh,试图开启ssh, service ssh start(无法开启ssh,因为没有安装ssh server 和 client)
3.获取ssh server和client 安装包,apt update(返回很多404错误,说明有很多网址无法打开)
4.在网络上搜寻可用的源列表(source.list 位置为:/etc/apt/sources.list),例如163的源列表
deb http://mirrors.163.com/ubuntu/ quantal main universe restricted multiverse
deb-src http://mirrors.163.com/ubuntu/ quantal main universe restricted multiverse
deb http://mirrors.163.com/ubuntu/ quantal-security universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ quantal-security universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ quantal-updates universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ quantal-proposed universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ quantal-proposed universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ quantal-backports universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ quantal-backports universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ quantal-updates universe main multiverse restricted
为原来的sources.list做备份,然后更新源列表,做 update(apt update),仍然发现很多404错误(这是因为源列 表的目录已经更改,即quantal目录已经不存在)
5.进入http://mirrors.163.com/ubuntu/dists 查看发现quantal已经不再存在,而lucid目录存在(如下图所示),并且有与quantal对应的文件和目录,将source.list中quantal全部替换为lucid。
6.做update(apt update)
7.安装ssh server和client, sudo apt-get install openssh-server;sudo apt-get install openssh-client
8.开启ssh服务, etc/init.d/ssh start
9.查看ssh服务状态 ps -ef|grep ssh,发现进程已起
10.putty 连接Ubuntu成功
如下为解决方案:
1.在Ubuntu上查看ssh服务是否开启, ps -ef|grep ssh
2.发现没有开启ssh,试图开启ssh, service ssh start(无法开启ssh,因为没有安装ssh server 和 client)
3.获取ssh server和client 安装包,apt update(返回很多404错误,说明有很多网址无法打开)
4.在网络上搜寻可用的源列表(source.list 位置为:/etc/apt/sources.list),例如163的源列表
deb http://mirrors.163.com/ubuntu/ quantal main universe restricted multiverse
deb-src http://mirrors.163.com/ubuntu/ quantal main universe restricted multiverse
deb http://mirrors.163.com/ubuntu/ quantal-security universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ quantal-security universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ quantal-updates universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ quantal-proposed universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ quantal-proposed universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ quantal-backports universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ quantal-backports universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ quantal-updates universe main multiverse restricted
为原来的sources.list做备份,然后更新源列表,做 update(apt update),仍然发现很多404错误(这是因为源列 表的目录已经更改,即quantal目录已经不存在)
5.进入http://mirrors.163.com/ubuntu/dists 查看发现quantal已经不再存在,而lucid目录存在(如下图所示),并且有与quantal对应的文件和目录,将source.list中quantal全部替换为lucid。
6.做update(apt update)
7.安装ssh server和client, sudo apt-get install openssh-server;sudo apt-get install openssh-client
8.开启ssh服务, etc/init.d/ssh start
9.查看ssh服务状态 ps -ef|grep ssh,发现进程已起
10.putty 连接Ubuntu成功
相关文章推荐
- Linux文件的特殊属性chattr工具
- VI常用命令
- VI常用命令
- VI常用命令
- VI常用命令
- VI常用命令
- 安装Ubuntu版本linux过程中没有提示设置root用户密码问题的解决办法
- centos6.5安装mysql
- linux系统sudo命令的深切体会
- Linux安装JAVA(使用wget下载JDK--跳过accept licence)
- Linux常用命令(一)
- Linux 内核链表
- 更新CentOS中的python(从2.6.X到2.7.X)
- redhat6.5配置centos6 yum替换
- centos7中crontab的变更
- Openstack在centos上的配置--(一)前期环境准备
- 本地yum源的配置
- linux查找目录下的所有文件中是否含有某个字符串
- Mysql安装(Centos6.2)
- CentOS 7 编译安装PHP7