Wednesday, March 4, 2020

Unix or AIX - SFTP or SSH - no matching host key type found. Their offer: ssh-dss

While we are doing sftp or ssh from unix/AIX box, we came across with the following error:

Error:
Unable to negotiate with {IP} port 22: no matching host key type found. Their offer: ssh-dss

Solution:

Temporary fix:
Instead of using the command: sftp user@host or ssh {IP}, Use the following:

sftp -oHostKeyAlgorithms=+ssh-dss user@host
or
ssh -oHostKeyAlgorithms=+ssh-dss {IP}

Permanent fix:
Create a file called “~/.ssh/config” with the following content:
Host {IP}
HostKeyAlgorithms=+ssh-dss

Command:
cat > ~/.ssh/config
Host {IP}
HostKeyAlgorithms=+ssh-dss

Than press CTRL + D to save it.

Note: If you mention empty above file then you will get following error:
/home/oracle/.ssh/config: line 1: Bad configuration option: \001.
/home/oracle/.ssh/config: terminating, 1 bad configuration options

No comments:

Post a Comment

Featured Post

11g to 12c OSB projects migration points

1. Export 11g OSB code and import in 12c Jdeveloper. Steps to import OSB project in Jdeveloper:   File⇾Import⇾Service Bus Resources⇾ Se...