首页 > 其他分享 >ssh 远程登录报错:Unable to negotiate with IP port 22: no matching host key type found. Their offer: ssh-rs

ssh 远程登录报错:Unable to negotiate with IP port 22: no matching host key type found. Their offer: ssh-rs

时间:2024-08-07 13:50:03浏览次数:7  
标签:1.230 dss 192.168 host 报错 ssh key matching

最近在Mac上想要远程一台Linux服务器,结果不知怎么的就不能使用以前的ssh登录了

iot@ios-iMac ~ % ssh [email protected]                             

Unable to negotiate with 192.168.1.230 port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss

 

查了下,需要指定加密连接方式,结果如下:

 iot@ios-iMac ~ % ssh -oHostKeyAlgorithms=+ssh-dss [email protected]

The authenticity of host '192.168.1.230 (192.168.1.230)' can't be established.

DSA key fingerprint is SHA256:***********5+75ZypSQtVtGGJNbbA/6amkjEDA.

This key is not known by any other names

Are you sure you want to continue connecting (yes/no/[fingerprint])? yes

Warning: Permanently added '192.168.1.230' (DSA) to the list of known hosts.

[email protected]'s password: 

Last login: Fri Jun 28 16:35:41 2024 from 192.168.9.16

这样就可以连接成功了,但是那个参数复杂又不能自动不全,比较麻烦,不想每次都输怎么办?

Mac上可以这样处理:

 

 iot@ios-iMac ~ % sudo vim /etc/ssh/ssh_config

最后一行添加全局变量:

    HostKeyAlgorithms +ssh-dss
#   ProxyCommand ssh -q -W %h:%p gateway.example.com
#   RekeyLimit 1G 1h
#   UserKnownHostsFile ~/.ssh/known_hosts.d/%k
Host *
    SendEnv LANG LC_*
    HostKeyAlgorithms +ssh-dss

这样操作以后就不用每次都带那个参数了,可以像之前一样使用简单版的ssh root@IP了

其它平台应该也是类似的,在ssh的配置文件中添加全局选项即可解决问题,我这个是Mac升级系统导致的。

对了,以上是在客户端操作的!

 

标签:1.230,dss,192.168,host,报错,ssh,key,matching
From: https://www.cnblogs.com/bestechshare/p/18346881

相关文章

  • impdp/expdp报错: ORA-39064: 无法写入日志文件 ORA-29285: 文件写入错误
    问题现象Windows服务器导入/导出Oracle11g数据库出现如下报错提示,输出的日志文件从报错位置往后不再输出。ORA-39064:无法写入日志文件ORA-29285:文件写入错误问题原因原因是客户端环境变量NLS_LANG与数据库字符集不一致,而数据泵在写日志文件的时候使用的是————数据......
  • Linux服务器SSH远程密钥免密登录
    说明业务场景中经常需要进行跨服务器的操作,即从一台服务器上登录到另外一台服务器,默认情况下,SSH远程登录时需要输入远程服务器密码。当需要在可信任的服务器之间进行频繁或自动化的操作时,输入密码就会带来不便。本文介绍如何实现SSH远程免密登录。服务器信息假设有2台服......
  • Hadoop3.4.0跑wordcount程序报错:org.apache.hadoop.mapreduce.v2.app.MRAppMaster
    部署完Hadoop3.4.0HA后跑wordcount程序报错,在日志文件里 http://rsnode:8042/logs/userlogs 里看到报错日志说不能加载主类 org.apache.hadoop.mapreduce.v2.app.MRAppMaster网上给的办法大多都是让执行hadoopclasspath然后把那一长串配置到 mapred-site.xml。如图 ......
  • WPFUI报错 - page does not have a parameterless constructor
    WPFUI报错pagedoesnothaveaparameterlessconstructor.IfyouareusingWpf.Ui.IPageServicedonotnavigateinitiallyanddon'tuseCacheorPrecache问题原因WPFUI中的NavigationView只支持导航页面的无参构造函数或含一个dataContext的有参构造函数。因为在View......
  • 【linux】关于qemu-img创建虚拟机前端磁盘报错
    问题描述:使用qemu-imgcreate-fqcow2-bcirros.qcow2vmhost.img20G创建虚拟机磁盘出现以下报错,报错内容:qemu-img:vmhost.img:BackingfilespecifiedwithoutbackingformatDetectedformatofqcow2.[root@ecsimages]#qemu-imgcreate-fqcow2-bcirros.qcow2vmho......
  • 【Pyautogui自动准备jupyter】附上报错合集,已解决
    刚认识了pyautogui,浅浅写一段自动准备jupyter的程序importpyautogui#importpyperclipimporttimedefopen_jupyter():print('Openingjupyter...')time.sleep(1)try:location=pyautogui.locateOnScreen(r"D:\STEFANOS\python\t......
  • Linux系统下通过ssh免密实现一键批量关机
     一、实验环境介绍本文通过一台控制端机器对其他多台机器进行远程关机操作,实验IP如下:控制端:192.168.80.177被控制关机端:192.168.80.130,192.168.80.206二、ssh免密登录配置以下操作均在控制端(80.177)上用root用户权限进行操作1、生成私钥密钥对,执行ssh-keygen -t rsa然......
  • 解决torchaudio.load报错 (Couldn't find appropriate backend to handle uri )
    解决torchaudio.load报错(Couldn'tfindappropriatebackendtohandleuri)问题描述(报错信息):问题:Traceback(mostrecentcalllast): File"resample.py",line43,in<module>  resample_use_cuda() File"resample.py",line24,inres......
  • Ubuntu 24.04 LTS Noble安装OpenSSH服务器
    OpenSSH服务器在 UbuntuLinux上提供安全外壳(SSH)协议,以便远程管理系统,同时提供高级别的加密,确保安全。虽然许多Linux系统默认配备OpenSSH服务器,但在Ubuntu24.04上,我们必须手动安装它。因此,在本教程中,我们将介绍在Ubuntu24.04系统上安装和配置OpenSSH服务......
  • ADFS配置“声明提供方信任”时,读取url报错
    声明提供方信任,通过Haproxy2.8.5提供https服务,metadata通过url可以正常打开页面ADFS在配置“声明提供方信任”时,通过URL访问声明提供方的联合元数据,提示“SSL连接通道已关闭”或“基础连接已关闭”,查看haproxy日志发现保存日志““SSLhandshakefailure(error:14209102:SSLro......