Problems of ssh connection

To connect via ssh to a remote server, I have to add this line before the address. ssh -oHostKeyAlgorithms=+ssh-dss Is it possible to make this line with this address so that it is entered automatically ?

Yes, create a config for this specific server.

OpenSSH - ArchWiki

ssh_config(5) — Arch manual pages

I can put in ssh_config for exemple: "Host freehost HostName IP ADDRESS Port 22 User root IdentityFile /root/.ssh/id_rsa or Host DB1 HostName db1.server.uk Port 2222 User adminDB " Where should I put the line “ssh -oHostKeyAlgorithms=+ssh-dss” ?

Not in ssh_config. This is for every user and every connection. Unless you want add an insecure algorithm to the list for every connection, don’t do this.

Create a config for the user you use to connect to this server. Do you use root on your local machine for this? Then it would be /root/.ssh/config .

This is an example for a connection.

Host DB1
    Hostname  db1.server.uk
    Port  2222
    User  adminDB
    IdentityFile  /root/.ssh/id_rsa
    HostKeyAlgorithms  +ssh-dss

then use only ssh DB1

Also see the example in the release notes.

Thanks . Now It work

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.