美文网首页
ssh使用的一些问题

ssh使用的一些问题

作者: CStart | 来源:发表于2023-02-15 16:56 被阅读0次

问题一:配置ssh免密登录时出现错误

debug2: we sent a publickey packet, wait for reply

debug3: receive packet: type 51

debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password

debug1: Trying private key: /home/g/.ssh/id_dsa

debug3: no such identity: /home/g/.ssh/id_dsa: No such file or directory

debug1: Trying private key: /home/g/.ssh/id_ecdsa

debug3: no such identity: /home/g/.ssh/id_ecdsa: No such file or directory

debug1: Trying private key: /home/g/.ssh/id_ed25519

debug3: no such identity: /home/g/.ssh/id_ed25519: No such file or directory

debug2: we did not send a packet, disable method

debug3: authmethod_lookup password

debug3: remaining preferred: ,password

debug3: authmethod_is_enabled password

debug1: Next authentication method: password

解决方式:修改vim /etc/ssh/sshd_config配置中,StrictModes no,然后重启ssh:service sshd restart,就可以免密登录了

如果StrictModes为yes必需保证存放公钥的文件夹的拥有与登陆用户名是相同的。

问题二:ssh的时候出现

当ssh root@10.4.8.15出现如下错误:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!    @

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!

Someone could be eavesdropping on you right now (man-in-the-middle attack)!

It is also possible that a host key has just been changed.

The fingerprint for the ECDSA key sent by the remote host is

SHA256:AmePGXvg0Y7uHo//Gpc2VnOFl4h2XLRmqHvSWCYNxh4.

Please contact your system administrator.

Add correct host key in /home/g/.ssh/known_hosts to get rid of this message.

Offending ECDSA key in /home/g/.ssh/known_hosts:16

  remove with:

  ssh-keygen -f "/home/g/.ssh/known_hosts" -R 10.4.8.15

ECDSA host key for 10.4.8.15 has changed and you have requested strict checking.

Host key verification failed.

则说明,对应机器的公钥改变了,验证错误。

解决方式,删除对应的公钥信息:shh-keygen -R 10.4.8.15

相关文章

  • ssh和scp使用

    ssh客户端基本使用 scp使用 ssh免密码登录 ssh配置别名

  • CentOS7部署ssh证书登录

    为了不改变.ssh的权限, 使用ssh-keygen生成公钥和私钥, 同时生成.ssh目录 使用man ssh-k...

  • SSH Key生成

    使用Open SSH 生成ssh key 使用:Github:打开setting->SSH keys,点击右上角 ...

  • macOS登录ssh的超炫酷方法

    ​ssh配置 ssh config配置 ssh-config是使用openssh 的ssh config的功能,需...

  • SSH key的生成及使用

    SSH key的生成及使用 SSH key生成及其使用 一、检查是否已经存在ssh key 通常sshkey会默认...

  • Mac下自带的终端使用ssh\sftp\ftp\telnet

    使用SSH Windows下我习惯用PUTTY来ssh登录,Mac直接使用Terminal即可。 ssh的一些常用...

  • Git使用(三)

    用SSH连接GitHub 关于SSH: 使用SSH协议,你可以连接并验证远程服务器和服务。 使用SSH密钥,您可以...

  • Permission denied (publickey). M

    mac os git 使用ssh 出现Permission denied的问题,使用 ssh agent 解决之后...

  • 学习整理

    1、SSH基本使用 1.1 使用ssh连接远程服务器 ​ a、ssh 用户名@IP 地址,比如 un...

  • ssh和scp的简单使用

    SSH 客户端的简单使用: 使用ssh客户端远程登录到指定的计算机$ ssh [-p port] user@rem...

网友评论

      本文标题:ssh使用的一些问题

      本文链接:https://www.haomeiwen.com/subject/kopdfdtx.html