User Tools

Site Tools


sandbox:default-ssh-login-user

Default SSH user

A better solution than putting an alias in your bashrc, would be to use a ssh config file

cat ~/.ssh/config
 
HOST *  
USER root

You can also specify certain subdomains use certain users. Useful if your laptop travels between networks.

HOST 192.168.*.*
USER homeuser
 
HOST 10.2.*.*
USER workuser

You could even configure by domains, and use different ssh keys for different domains.

HOST *.microsoft.com
USER bill
IdentityFile ~/.ssh/microsoft/id_rsa
 
HOST *.apple.com
USER steve
IdentityFile ~/.ssh/apple/id_rsa

More resources to read:

sandbox/default-ssh-login-user.txt · Last modified: 2019/04/25 23:40 by dreiggy