Display Usernames in an ssh network?
I'm trying to ssh into a network. When I get there, it prompts me for the password to the username I had entered with it. However, I don't remember my username.
Is there any way perhaps to开发者_高级运维 look at all the usernames listed within a network like this? If I can do that, I can figure out which one is mine.
ssh by default will use the username of the account you're running it from. E.g. If you're logged into machine A as user 'xyz', then by default it'll transmit "username = xyz" to machine B when you try to ssh to it.
if you want to force a particular username, then use
ssh remoteusername@remotehost.com
If you've completely forgotten your remote username, then no... ssh will not scan the remote system and tell you what accounts are on it. That'd be a hideously BAD security hole.
Im not completely sure what you have and what you don't. If you know the password and are logged in, you can run the command whoami
to know your username.
精彩评论