SSH issues

I am fairly new to BSD but I have been using Linux for a while. It might just be that I am stupid and overlooked something stupid so go easy on me.

At any rate I have several servers with BSD on them. On several of them I edit /etc/ssh/ssh_config and I tried to change the port and allow root login. After this I used service sshd restart. The issue is this config has taken affect on 1 of the servers but some of them just won't update with the new config. When I go back into the file it correctly shows the config I want, but even after restarting the computer it will still not take the new config and I have to login on port 22. What's going on?
 
Last edited by a moderator:
It's never a good idea to allow root to login via ssh. Always best to ssh in as a regular user and su or sudo up to root. If your user is a member of the wheel group, they can su - and provide root's password. However that is your security concern.

ssh_config(5) is the client configuration file, not the server, which is sshd_config(5), so maybe you changed the wrong file on one host?
It would be helpful to see the config file, rather than trying to work in the dark....

You don't need to restart the host, just the daemon, service sshd restart as root will do that.
 
If you must allow root login over SSH do it with very strong (4096 bit) RSA keys. There are uses for allowing root logins over SSH such as automated backups where logging in first with an unprivileged user and then using sudo or similar for elevated privileges is bit cumbersome.
 
Back
Top