【问题标题】:SQLPro read_passphrase: can't open /dev/tty: Device not configuredSQLPro read_passphrase:无法打开/dev/tty:设备未配置
【发布时间】:2020-04-28 00:49:17
【问题描述】:

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

我现在也遇到了 GIT 的这个问题,它要求我输入密码。

我已更新 dev/tty 的权限,尝试删除 known_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).

【问题讨论】:

标签: git ssh ssh-keys


【解决方案1】:

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

  • 首先,你应该确认你的公钥已经被添加到Linux服务器中,猜猜你已经这样做了。

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

希望对你有所帮助。

【讨论】:

  • 这行得通。不知道有什么区别,但只有非 .pub 文件有效。
猜你喜欢
  • 2014-05-14
  • 2022-01-12
  • 1970-01-01
  • 2021-06-29
  • 2017-04-18
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-12-23
相关资源
最近更新 更多