puttygen.exe生成的密鑰文件(SSH-2 RSA)服務器
分別有公鑰和私鑰app
服務器端:~/.ssh/authorized_keysssh
把公鑰複製到這個openssh認證文件裏面。工具
客戶端FileZilla:this
編輯->設置->SFTP->添加密碼文件->選擇剛纔生成的私鑰文件。加密
文件->站點管理器->新建站點->填寫ip和端口->選擇sftp->登陸類型"通常" ,而後用戶填寫root,密碼留空便可。spa
點擊鏈接,出現下面錯誤:代理
命令: keyfile "rsa-key-FileZilla.ppk"excel
命令: open "root@XXX.XXX.XXX.XXX" 22orm
命令: Pass:
錯誤: 認證失敗。
錯誤: 嚴重錯誤
錯誤: 沒法鏈接到服務器
關鍵是一樣的私鑰,放在winscp和pageant均可以正常認證鏈接啊。
難道是這種加密類型FileZilla不支持???
尋找wiki
果真是SSH-2 RSA加密的問題,FileZilla若是要支持SSH-2 RSA加密,須要Putty的其餘工具,首先要把密鑰轉換成Putty的ppk格式,這個我以前就是用這個工具作的密鑰,因此沒有問題,而後還須要用pageant作代理才能正常使用,在pageant中託管密鑰,而後開啓FileZilla就能夠選擇sftp並正常使用了。
http://wiki.filezilla-project.org/Howto
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.
If your key file is already in PuTTY's PPK format you can skip this paragraph. However if your key is in OpenSSH format, you first need to convert it to PuTTY's PPK format. To do this, launch PuTTYgen and from the "Conversions" menu, select the "Import key" option. Select your key and follow the prompts to enter your pass phrase. Save your private key.
Now run Pageant. In your system tray, you'll see the Pageant icon appear. Right-click the icon and select "Add Key" and select your private key (PPK) file. Follow the prompt to enter your pass phrase and you're done.
Now simply launch FileZilla and connect to your server using SFTP using SSH2 with a username and an empty password. Don't forget to close pageant when you're done.