SSH configuration: override the default username [closed]
Solution 1:
Create a file called config
inside ~/.ssh
. Inside the file you can add:
Host *
User buck
Or add
Host example
HostName example.net
User buck
The second example will set a username and is hostname specific, while the first example sets a username only. And when you use the second one you don't need to use ssh example.net
; ssh example
will be enough.
Solution 2:
If you only want to ssh a few times, such as on a borrowed or shared computer, try:
ssh buck@hostname
or
ssh -l buck hostname