我有一个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
我会打开一扇不该打开的门,或者弄乱现在正在工作的钥匙和连接,从而开始劫持文件。有什么指示吗?