What is the entry I should add to my .bashrc
file so I can specify a default user for making SSH connections? For example, if I want it to be root and want to SSH to x, if I type ssh x
, it should default to a connection of ssh root@x
.
By default, Linux seems to default to whatever user you are logged in as. I.e., if I am logged in as "peter", typing ssh x
will result in a connection of ssh peter@x
.
Keep in mind I still want to override the default at times, so doing something like
alias ssh='ssh root@'
is not the most ideal solution.