1. 首先要明白什麼是ssh?
可以把ssh看做是telnet的加強版,telnet的密碼和資訊都是不加密的,而ssh則加密。
.
2. 開啟ubuntu上的ssh功能
先安裝,安裝後就自動開啟了.
(1).sudo apt-get install openssh-server openssh-client
.
(2)首先安裝SSH服務
輸入:sudo apt-get install openssh-server
啟動SSH服務
輸入:sudo /etc/init.d/ssh start
啟動之後可以檢查是否安裝成功並啟動
輸入:ssh -v
OpenSSH_5.1p1 Debian-6ubuntu2, OpenSSL 0.9.8g 19 Oct 2007
usage: ssh [-1246AaCfgKkMNnqsTtVvXxY] [-b bind_address] [-c cipher_spec]
[-D [bind_address:]port] [-e escape_char] [-F configfile]
[-i identity_file] [-L [bind_address:]port:host:hostport]
[-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
[-R [bind_address:]port:host:hostport] [-S ctl_path]
[-w local_tun[:remote_tun]] [user@]hostname [command]
看到類似資訊,說明安裝並啟動成功!
安裝成功之後還需要修改配置才能使用
修改ssh配置 :
輸入:sudo pico /etc/ssh/ssh_config
去掉 PasswordAuthenitcation, Port 22 ,Protocol 2,1這三行前的注釋#
注意哦, ubuntu9.10裡沒有permitrootlogin之類的東西
這裡需要重啟一下系統。
3. 安裝secureCRT
.
4. 查看ubuntu的ip
ifconfig(注意是ifconfig,不是windows上的ipconfig)
.
5. 串連
(1)secureCRT => Quick Connect(快速串連), 串連ubuntu, 輸入ubuntu的id和pwd
(2)重啟之後,設定SecureCRT串連Linux。
Protocol選擇SSH2,Hostname輸入Ubuntu的IP地址,Port輸入22,Firewall選擇none,username 輸入Ubuntu的使用者名稱
點擊Connect
6. 漢字亂碼問題的解決
串連成功了,發現secureCRT對漢字顯示亂碼。google了下,好像說ubuntu 2.6 kernel的ssh預設編碼是utf8,而secureCRT的預設顯示編碼好像不是utf8,那麼只要把secureCRT的顯示編碼修改成utf8就可以正確顯示了。在secureCRT中,選擇option(選項)->session option(會話選項)->apperance(外觀)裡把字元編碼改成utf8。
串連後的如下
這樣就可以把SecureCRT當Ubuntu下的終端一樣使用了。