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

OIC - Solution for 404 Not Found Error When Calling a Local Integration dynamically in OIC project

Issue: A 404 Not Found error occurs when dynamically calling a local integration within a project in OIC. Error details: CloudInvocationExc...