SQLPro read_passphrase:无法打开/ dev / tty:未配置设备

时间:2017-02-28 05:07:52

标签: git ssh ssh-keys

尝试使用SQL pro进入远程数据库时出现此错误。它时不时地工作,不知道发生了什么。

我现在也遇到了GIT这个问题,它要求我提供密码。

我已经更新了dev / tty的权限,尝试删除了know_hosts,检查〜/ ssh /的权限并添加了authorized_keys文件。什么都行不通。

错误:

Used command:  /usr/bin/ssh -v -N -S none -o ControlMaster=no -o ExitOnForwardFailure=yes -o ConnectTimeout=10 -o NumberOfPasswordPrompts=3 -i /Users/PackyTagliaferro/.ssh/id_rsa.pub -o TCPKeepAlive=no -o ServerAliveInterval=60 -o ServerAliveCountMax=1 -p 22 forge@107.170.236.120 -L 58527:127.0.0.1:3306 -L 58528:107.170.236.120:3306

OpenSSH_7.3p1, LibreSSL 2.4.1
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 20: Applying options for *
debug1: Control socket " none" does not exist
debug1: Connecting to 107.170.236.120 [107.170.236.120] port 22.
debug1: fd 3 clearing O_NONBLOCK
debug1: Connection established.
debug1: identity file /Users/PackyTagliaferro/.ssh/id_rsa.pub type 1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/PackyTagliaferro/.ssh/id_rsa.pub-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.3
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2p2 Ubuntu-4ubuntu2.1
debug1: match: OpenSSH_7.2p2 Ubuntu-4ubuntu2.1 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 107.170.236.120:22 as 'forge'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:Th+2puoVypXAN0yQ1t09AHbmnssBxkoRP+4Hl9dIJcI
debug1: Host '107.170.236.120' is known and matches the ECDSA host key.
debug1: Found key in /Users/PackyTagliaferro/.ssh/known_hosts:2
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/PackyTagliaferro/.ssh/id_rsa.pub
debug1: Server accepts key: pkalg rsa-sha2-512 blen 279
debug1: read_passphrase: can't open /dev/tty: Device not configured
debug1: permanently_drop_suid: 501
debug1: read_passphrase: can't open /dev/tty: Device not configured
debug1: permanently_drop_suid: 501
debug1: read_passphrase: can't open /dev/tty: Device not configured
debug1: permanently_drop_suid: 501
debug1: No more authentication methods to try.
Permission denied (publickey).

1 个答案:

答案 0 :(得分:3)

当使用SqlPro连接远程sql时,我也遇到了这个问题。

  • 首先,您应确认已将公钥添加到Linux服务器中,猜测您已完成此操作。

  • 其次,这是最重要的步骤。请加载私钥文件id_rsa而不是id_rsa.pub

Screenshot

希望这会对你有所帮助。