文章分類:作業系統
不喜歡使用 Ubuntu Server 命令列的朋友,下面的內容將會給你一個驚喜。我們照樣可以使用圖形化介面來管理命令列的系統。 遠程圖形化管理軟體也有很多,比如 SSH Secure Shell Client、FileZilla 等。
使用圖形化介面是易於操作,不過也要付出代價的——不能操作該使用者權限以外的檔案 ,這極大地限制了它的實用性。所以,這也是為什麼它只提供 SFTP(傳遞檔案功能)的原因。此外,如果你要刪除一個目錄檔案,那此操作將花費很長時間,而用 sudo rm 命令列一下子搞定。
使用SSH Secure Shell Client,該軟體是免費的SSH遠程登入軟體。缺點是使用本地編碼 ,比如windows是GBK,那麼登入就是通過GBK串連,這樣如果伺服器編碼是 UTF-8,會產生中文亂碼。
下面,我們將使用 FileZilla 的 SFTP 功能來實現 Windows XP 與 Ubuntu Server 之間的檔案傳輸互動功能。這樣,在 Windows 下,也可以使用圖形化介面來管理 command-line 格式的 Linux 伺服器了。
接下來,廢話就不多說了,進入主題——在 Windows 上,如何使用 FileZilla 的 SFTP 功能傳輸檔案。
- Launch FileZilla.
- Select "Site Manager" from the File pull-down menu. 選擇“開啟網站管理器”
- Click the "New Site" button. 點擊“新網站”
- Name the site "SEAS Home Directory" under "My FTP Sites". 網站管理器介面,“選擇項”下的“我的網站”
- Under "My FTP Sites", click on "SEAS Home Directory". 將“新網站”名稱重新命名為“lewis”
- Under Host, type
eniac.seas.upenn.edu . 輸入 “主機 ”的 域 名(前提是你有網域名稱伺服器)或 IP
- Under Port, type "22". SSH 伺服器的連接埠號碼
- Under "Servertype" type "SFTP using SSH2". 該服務的“伺服器類型”為“SFTP - SSH File Transfer Protocol”
- Under "Logontype" click the button next to "Normal". 登入類型為“一般”
- Under User, type your SEAS username. 登入的使用者名稱
- Click the button "Save and Exit".
Graph 1 Configure the Site Manager
那私密金鑰怎麼匯入呢?因為只有通過私密金鑰登入,才能進入伺服器。我們有兩種方式匯入私密金鑰。
- 直接配置 FileZilla 的 STPF 設定選項。選擇“編輯” -> “設定” -> "SFTP" -> “添加密鑰檔案”(look for Graph 1)。接著就是選擇私密金鑰檔案,如果你選擇的 FileZilla 可以識別的私密金鑰檔案,輸入私密金鑰密碼後就添加成功(look for Graph 2);但如果你選擇的 PuTTY 格式的私密金鑰檔案,那就要先轉化為 FileZilla 格式的私密金鑰並輸入私密金鑰密碼(look for Graph 3),才能添加成功。如果密鑰添加成功,則會在私密金鑰(K)文字框中顯示相關資訊(look for Graph 1)。
- 在 FileZilla 的官方文檔 Key-based authentication with SFTP 是這麼說明:Windows
For SFTP using SSH2, FileZilla utilizes the excellent PuTTY tools . To allow the use of RSA / DSA key files with Filezilla, you'll need to download two more tools from PuTTY: Pageant and (assuming your key file isn't already in PPK format) PuTTYgen .換句話說,我們可以使用 Pageant 的 Session 代理功能實現第一種方法的功能。
Graph 1 the main Set Configuration
Graph 2 Input the secret of Private Key
Graph 3 Transform the PuTTY type of Private key to FileZilla and save it
上述兩種方法都已測試過,可以串連到伺服器的。
到此為止,登入伺服器前的所有工作都已完畢。下載就登入系統測試一下吧,看能否成功?
OK, success, Congratulation!
參考文章
- SSH Secure Shell Client 的替代方案
- Key-based authentication with SFTP
- Secured SFTP using FileZilla