[英]Access denied for 'none'. Trying to access a MySQL Workbench database via SSH using RStudio
The SSH key is a key file; SSH 密钥是一个密钥文件; there is no string-based password to the server.
服务器没有基于字符串的密码。 Both the SSH host and the MySQL database are on the same server.
SSH 主机和 MySQL 数据库都在同一台服务器上。 I need to SSH into the server (code below) then access the database.
我需要通过 SSH 连接到服务器(下面的代码)然后访问数据库。 I've tried many different code snips and below is the furthest I've gotten.
我尝试了许多不同的代码片段,下面是我得到的最远的片段。
My "best" code:我的“最佳”代码:
library(ssh)
session <- ssh_connect("user@host", keyfile = "<local path>", verbose = 2)
print(session)
This gives the error:这给出了错误:
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
I got the same error because I tried to connect with my ed25519 key (using passphrase).我遇到了同样的错误,因为我试图连接我的 ed25519 密钥(使用密码)。 After switching the connection properties to my RSA key (using passphrase) the connection went fine.
将连接属性切换到我的 RSA 密钥(使用密码)后,连接正常。
There is a reported issue here: can not connect via "Standard TCP/IP over SSH" using ed25519 key这里有一个报告的问题:无法使用 ed25519 密钥通过“Standard TCP/IP over SSH”连接
A comment on that page says it works with ed25519 keys without passphrase but I haven't tested.该页面上的评论说它适用于没有密码的ed25519 密钥,但我还没有测试过。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.