Linux Administration Cookbook
上QQ阅读APP看书,第一时间看更新

SSHing to a different user

If the user you're connecting to is different to the one you're using locally (in our examples, it's always vagrant and vagrant), then you can manually specify the username on the command line.

The first way to do this is with the following syntax:

[vagrant@centos1 ~]$ ssh vagrant@centos2

The second way is with a flag:

[vagrant@centos1 ~]$ ssh centos2 -l vagrant