[problem help] 深度终端使用证书登录远程服务器失败 Resolved
Tofloor
poster avatar
157******16
deepin
2024-03-06 16:10
Author

使用深度终端,远程管理,添加证书后,连接远程服务器有以下错误信息:

Press ^@ (C-Space) to enter file transfer mode, then ? for help

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '/home/xx/ssh/xx.ppk' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "/home/xx/ssh/xx.ppk": bad permissions
xx@ip: Permission denied (publickey).


$ chmod 400 xx.ppk

Press ^@ (C-Space) to enter file transfer mode, then ? for help

Load key "/home/xx/ssh/xx.ppk": error in libcrypto
xx@ip: Permission denied (publickey).

更改权限为755,777,600,400,644,100等均失败,使用putty和FileZilla则可以正常登录。

Reply Favorite View the author
All Replies
dxy2020
deepin
2024-03-06 16:24
#1

证书目前支持rsa的公私钥吧,其他没试过

image.png

Reply View the author
157******16
deepin
2024-03-06 16:29
#2

看报错好象是权限问题,更改了.ppk文件权限之后,还是没办法登录到远端,奇怪的是putty和FileZilla客户端都可以正常使用这个私钥进行登录。

Reply View the author
乾豫恒益
deepin
2024-03-06 17:10
#3
157******16

看报错好象是权限问题,更改了.ppk文件权限之后,还是没办法登录到远端,奇怪的是putty和FileZilla客户端都可以正常使用这个私钥进行登录。

如果是用SSH登录,端口默认是22,FileZilla用的默认端口是21。

查一下配置文件,看看是不是22没有正确使用。

另外,再查一下IPtable 和 Firewall, 看看是不是被拦截了。

公钥被拦截,不能用,多半是Firewall给拦截了。

Reply View the author
ArchieMeng
deepin
2024-03-07 09:52
#4

Linux上ssh用的openssh,不支持ppk文件。要用的话必须转成公私钥对的文件形式。

Reply View the author
157******16
deepin
2024-03-07 16:09
#5

感谢,问题已解决。

Deepin下,直接使用私钥文件id_rsa,文件权限设置为400后,可以访问远程服务器。

$ ssh -i id_rsa user@ip -p 22

Reply View the author