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
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