ssh Permission denied (publickey)
程序员文章站
2022-05-14 21:22:43
...
ssh链接机器是报错:
ssh -p 29418 [email protected]
Permission denied (publickey).
ssh-****** -t rsa -c "admin" -f ~/.ssh/root
原因是上面这个命令生成**的时候指定了**的文件root,而系统默认的**文件名为:id_rsa,所以系统会出现以上错误。
解决办法:
1、使用默认**文件名id_rsa
2、vim /etc/ssh/ssh_config文件IdentityFile项设置**文件为:
IdentityFile ~/.ssh/root
如下成功:
[[email protected] .ssh]# ssh -p 29418 [email protected]
**** Welcome to Gerrit Code Review ****
Hi admin, you have successfully connected over SSH.
Unfortunately, interactive shells are disabled.
To clone a hosted Git repository, use:
git clone ssh://[email protected]:29418/REPOSITORY_NAME.git
上一篇: 新浪股票信息爬取
推荐阅读
-
Serv-U 550 Permission denied 的解决办法
-
Apache启动错误Permission denied: httpd: could not open error log file解决方法
-
日志文件写入失败(permission denied)
-
CentOS7 SSH 密码正确,但仍提示“Permission denied”
-
yum 安装memcache permission denied(拒绝访问) 问题
-
Nginx应对Permission denied和File not found的配置
-
linux下VSFTP 530 Permission denied错误的解决办法
-
Linxu SSH登陆出现Access Denied错误的解决方法
-
Nginx报403 forbidden错误 (13: Permission denied)的解决办法
-
Nginx中报错:Permission denied与Connection refused的解决