ssh-add 在計算引擎 ubuntu 虛擬機器上用於外出

ssh-add 在計算引擎 ubuntu 虛擬機器上用於外出

我有一個id_rsa金鑰,用於透過 scp 連接到已移至 Ubuntu GCE 的遠端伺服器。我已將密鑰 ( id_rsa) 放入主用戶.ssh資料夾中,chmod 600 但ssh-add不會拾取它。

sftp -v -o 'IdentityFile2 id_rsa' user@domain給我:

OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /home/my_user/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to remotesite.com [66.xx.xx.xx] port 22.
debug1: Connection established.
debug1: identity file id_rsa type -1
debug1: identity file id_rsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
ssh_exchange_identification: read: Connection reset by peer
Couldn't read packet: Connection reset by peer

ssh-add id_rsa:

SSH_AGENT_FAILURE
Could not add identity: id_rsa

我讓遠端 IDE 和 SSH 用戶端能夠連接到我的伺服器,並且喜歡安全性,並且有點偏執地開始劫持文件,sshd_conf以防我打開不應該打開的門或弄亂正在工作的金鑰和連接現在。有什麼指點嗎?

相關內容