I try
ssh xxx.xxx.xxx.xxx
Unable to negotiate with xxxx port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss
than I add to /etc/ssh/sshd_config
Host pal
HostName xxx.xxx.xxx.xxx
HostKeyAlgorithms=+ssh-dss
``` than I restart sshd
systemctl restart sshd
Job for sshd.service failed because the control process exited with error code.
See "systemctl status sshd.service" and "journalctl -xeu sshd.service" for details.
ssh requires a server computer and a client computer. A ssh connection is initiated by the client computer.
In /etc/ssh there are two config files
ssh_config
sshd_config
ssh_config is the configuration file for the client computer
sshd_config is the configuration file for the server computer.
Are you trying to ssh into a server you have on your LAN, or a remote computer you have no control over? We need a little more information on what you are trying to do.
expanding on what @2000 said, try
username@xxx.xxx.xxx.xxx -p 22
The issue appears to be the servers use of a legacy algorithm, that your SSH client no longer supports by default.
You were taking the right step in adding support for that deprecated algoirthm, but you’ve added to your sshd server, not your client config.
Edit your ~/.ssh/config file instead, creating a record for the server you’re connecting to. It might look something like this, changing or removing details, as necessary. The important line in your situation, is HostkeyAlgorithms +ssh-dss :
Host hostnickname
HostName xxx.xxx.xxx.xxx
IdentityFile ~/.ssh/someprivatekey
HostkeyAlgorithms +ssh-dss
User yourremoteusername
Port 22
Then connect, with hostnickname being whatever you’ve dubbed this host in that config file: