今天忽然想到用Android手機連接Ubuntu,這會用到SSH。但是Ubuntu 14.04 默認沒有安裝SSH相關服務,所以需要自己動手安裝下!
開始安裝SSH服務,終端:sudo apt-get install openssh-server
安裝完後,啟動SSH服務,終端:sudo /etc/init.d/ssh start,確認下是否成功啟動了,終端:ps -e|grep sshd,有sshd進程,則代表SSH服務啟動成功!
默認連接端口:22,可以更改,配置文件為:/etc/ssh/sshd_config,更改配置需重啟SSH服務。
然後在Android手機上安裝一個SSH客戶端,用ifconfig查看本機外網ip,然後使用這個ip就可以讓Android手機連接到Ubuntu了!
通過OpenSSH遠程登錄時的延遲問題解決 http://www.linuxidc.com/Linux/2013-07/86879.htm
Ubuntu 12.10下OpenSSH的離線安裝方法 http://www.linuxidc.com/Linux/2013-04/82814.htm
OpenSSH升級步驟及注意事項詳解 http://www.linuxidc.com/Linux/2013-04/82123.htm
OpenSSH普通用戶無法登錄的幾種情況的解決方法 http://www.linuxidc.com/Linux/2012-05/59457.htm
通用線程: OpenSSH 密鑰管理,第 1 部分理解 RSA/DSA 認證 http://www.linuxidc.com/Linux/2011-08/39871.htm
RedHat安裝OpenSSH和配置sftp鎖定目錄 http://www.linuxidc.com/Linux/2012-12/75398.htm
更多Ubuntu相關信息見Ubuntu 專題頁面 http://www.linuxidc.com/topicnews.aspx?tid=2
更多Android相關信息見Android 專題頁面 http://www.linuxidc.com/topicnews.aspx?tid=11