MobaXterm无法登陆oracle cloud的问题

问题

我在oracle cloud上创建实例的时候,只能使用密钥的方式登陆,当时下载了私钥文件。实例创建好以后,在mobaxterm上使用这个私钥文件无法登陆

排查

尝试使用mobaxterm的keygen,把私钥文件转成ppk格式,还是不行。

后来经过测试发现使用windows下的ssh命令可以登陆
ssh -i private-key-file [email protected]

登陆以后检查ssh的日志journalctl -u ssh

error: Received disconnect from x.x.x.x port 15673:14: No supported authentication methods available [preauth]

解决方案1

修改ssh的配置/etc/ssh/sshd_config,允许密码登陆

复制代码
PermitRootLogin yes
PasswordAuthentication yes
KbdInteractiveAuthentication yes

重启ssh服务sudo systemctl restart ssh

解决方案2

参考:https://unix.stackexchange.com/questions/721606/ssh-server-gives-userauth-pubkey-key-type-ssh-rsa-not-in-pubkeyacceptedalgorit

修改配置文件

复制代码
PubkeyAcceptedAlgorithms +ssh-rsa

重启服务,然后mobaxterm使用密钥可以登陆

解决方案3

升级mobaxterm到21.5以上的版本

原因

相关推荐
itachi-uchiha12 小时前
关于dropbear ssh服务
运维·ssh
tiging1 天前
centos实现SSH远程登录
linux·centos·ssh
蓝黑20202 天前
使用SSH tunnel访问内网的MySQL
mysql·ssh·proxy
noravinsc2 天前
django ssh登录 并执行命令
django·sqlite·ssh
ergevv2 天前
在 RK3588 上通过 VSCode 远程开发配置指南
vscode·debian·ssh·rk3588·远程开发
EchoZeal3 天前
Linux远程连接主机——ssh命令详解
linux·运维·服务器·ssh
chenzfp4 天前
【运维】统信UOS操作系统aarch64自制OpenSSH 9.6p1 rpm包(含ssh-copy-id命令)修复漏洞
linux·运维·ssh
DYF-AI4 天前
ssh登录wsl2
运维·ssh
CC_IsMe5 天前
Linux服务器 TensorFlow找不到GPU
linux·jupyter·ssh·conda·tensorflow
笨小蛙6 天前
服务器Docker容器创建与VScode远程连接SSH使用
服务器·vscode·docker·容器·ssh