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連接

使用ifconfig查看Ubuntu的IP地址

第一次連接會有一個密鑰的請求接受,接受即可

成功連接上了

小問題

在第一次連接的時候,使用默認的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~

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章