【发布时间】:2019-08-05 09:11:55
【问题描述】:
我正在通过 ssh 隧道连接到远程数据库
提到here
这是 DBeaver 屏幕截图:
还有
我正在为 ssh 做的是:
ssh -i sharp -N -L 13306:127.0.0.1:3306 root@163.182.198.10
但它说
Permission denied (publickey).
我错过了什么?
【问题讨论】:
标签: php database laravel laravel-5 ssh
我正在通过 ssh 隧道连接到远程数据库
提到here
这是 DBeaver 屏幕截图:
还有
我正在为 ssh 做的是:
ssh -i sharp -N -L 13306:127.0.0.1:3306 root@163.182.198.10
但它说
Permission denied (publickey).
我错过了什么?
【问题讨论】:
标签: php database laravel laravel-5 ssh
您指定的公钥不正确。
我的意思是,你给我们的错误告诉了你。
-i identity_file
Selects a file from which the identity (private key) for public key authentication is read. The default is ~/.ssh/id_dsa, ~/.ssh/id_ecdsa, ~/.ssh/id_ed25519 and
~/.ssh/id_rsa. Identity files may also be specified on a per-host basis in the configuration file. It is possible to have multiple -i options (and multiple
identities specified in configuration files). If no certificates have been explicitly specified by the CertificateFile directive, ssh will also try to load cer-
tificate information from the filename obtained by appending -cert.pub to identity filenames.
出于好奇,是什么阻止你使用它?
https://packagist.org/packages/stechstudio/laravel-ssh-tunnel
还有:
如果您阅读 cmets,您会发现一些使用 -N 选项报告问题的问题。尝试删除它。
-N Do not execute a remote command. This is useful for just forwarding ports.
【讨论】: