Is there a way to set it so that when you do ssh 123.122.123.123. it will use the user root instead of your logged in user as if you did ssh root@123.122.123.123
so every time you specify no user, it will default to root
1 Answer
You can do this by adding an entry to your local ~/.ssh/config file like
Hostname 123.122.123.123
User rootNote that you will need to have enabled root login on the target host: I strongly recommend that you do not do so using password-based login, but instead by setting up secure key-based authentication using the default prohibit-password configuration