对'的访问被拒绝;无;。尝试使用RStudio通过SSH访问MySQL工作台数据库

对'的访问被拒绝;无;。尝试使用RStudio通过SSH访问MySQL工作台数据库,mysql,r,Mysql,R,SSH密钥是一个密钥文件;服务器没有基于字符串的密码。SSH主机和MySQL数据库都位于同一台服务器上。我需要SSH连接到服务器(下面的代码),然后访问数据库。我尝试过许多不同的代码剪接,下面是我得到的最远的 我的“最佳”代码: library(ssh) session <- ssh_connect("user@host", keyfile = "<local path>", verbose = 2) print(session) ss

SSH密钥是一个密钥文件;服务器没有基于字符串的密码。SSH主机和MySQL数据库都位于同一台服务器上。我需要SSH连接到服务器(下面的代码),然后访问数据库。我尝试过许多不同的代码剪接,下面是我得到的最远的

我的“最佳”代码:

library(ssh)
session <- ssh_connect("user@host", keyfile = "<local path>", verbose = 2)
print(session)
ssh_pki_import_privkey_base64: Trying to decode privkey passphrase=false
ssh_connect: libssh 0.8.6 (c) 2003-2018 Aris Adamantiadis, Andreas Schneider and libssh contributors. Distributed under the LGPL, please refer to COPYING file for information about your rights, using threading threads_pthread
ssh_socket_connect: Nonblocking connection socket: 13
ssh_connect: Socket connecting, now waiting for the callbacks to work
socket_callback_connected: Socket connection callback: 1 (0)
ssh_client_connection_callback: SSH server banner: SSH-2.0-OpenSSH_7.4
ssh_analyze_banner: Analyzing banner: SSH-2.0-OpenSSH_7.4
ssh_analyze_banner: We are talking to an OpenSSH client version: 7.4 (70400)
ssh_known_hosts_read_entries: Failed to open the known_hosts file '/etc/ssh/ssh_known_hosts': No such file or directory
ssh_kex_select_methods: Negotiated curve25519-sha256,ssh-ed25519,aes256-ctr,aes256-ctr,hmac-sha2-256,hmac-sha2-256,none,none,,
ssh_packet_dh_reply: Received SSH_KEXDH_REPLY
ssh_client_curve25519_reply: SSH_MSG_NEWKEYS sent
ssh_packet_newkeys: Received SSH_MSG_NEWKEYS
ssh_packet_newkeys: Signature verified and valid
Found known server key: <...placeholder key data stuff...>
ssh_packet_userauth_failure: Access denied for 'none'. Authentication that can continue: publickey
ssh_packet_userauth_failure: Access denied for 'none'. Authentication that can continue: publickey
ssh_packet_userauth_failure: Access denied for 'publickey'. Authentication that can continue: publickey
ssh_packet_userauth_failure: Access denied for 'publickey'. Authentication that can continue: publickey
Error: Authentication with ssh server failed
库(ssh)

会话我遇到了相同的错误,因为我试图使用我的ed25519密钥(使用密码短语)连接。将连接属性切换到我的RSA密钥(使用密码短语)后,连接正常

这里有一个报道的问题:

该页面上的一条评论说,它可以使用ed25519密钥,而不使用密码短语,但我还没有测试过