Ubuntu16不能使用终端工具连接问题

问题描述:
在使用secureCRT连接Ubuntu16时,发现总是timeout,但是ping是可以ping通的,说明通信没有问题,
解决过程:

在网上找了一下解决方法,需要安装openssh-server组件才行

sudo apt-get install openssh-server

但是使用官方的源不行,所以这里需要换一下阿里的跟新源,香的一批

sudo leafpad /etc/apt/sources.list 

修改成下面的跟新源,然后保存一下就行了,

deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse

然后使用sudo apt-get update 跟新一下,跟新完以后,就可以安装openssh-sever了,速度快的一批

sudo apt-get install openssh-server

安装好openssh-server以后,使用secureCRT连接

Ubuntu16不能使用终端工具连接问题_第1张图片

Ubuntu16不能使用终端工具连接问题_第2张图片

使用ifconfig查看Ubuntu的IP地址

Ubuntu16不能使用终端工具连接问题_第3张图片

Ubuntu16不能使用终端工具连接问题_第4张图片

Ubuntu16不能使用终端工具连接问题_第5张图片

第一次连接会有一个密钥的请求接受,接受即可

Ubuntu16不能使用终端工具连接问题_第6张图片

成功连接上了

Ubuntu16不能使用终端工具连接问题_第7张图片

小问题

在第一次连接的时候,使用默认的root用户,然后在连接的时候改成了自己的用户名,会提示下面信息The server has disconnected with an error.  Server message reads:
A protocol error occurred. Change of username or service not allowed: (pma_etl,ssh-connection) -> (etl,ssh-connection) 

出现这个错误的原因就是不能再连接的时候修改用户名,只能在创建的时候就要输入用户名了,就是在上面创建的时候输入自己用户名的那一步,有人使用的是快速连接是默认的使用root账号进行连接,这就导致了出现这个中问题了。

所以解决方法就是删掉这个会话,然后安装我上面创建的步骤,一步一步创建,在输入用户名的时候不要使用root,修改成自己的Ubuntu的用户名。over~

你可能感兴趣的:(Linux,解决问题)