Hi I have some hosts I need to ssh to, the username I use for those hosts are different then the username of the pc that I ssh from. but the password is the same, is it possible that when I ssh it will automatically use the password of the pc that I ssh from.
Also some hosts that I ssh to, have the same username and password of the computer that I ssh from. How can I tell ssh to automatically use the same password and username that I use in the pc that I ssh from?
thanks.
you can change, on a per session bassis distant username with either:
ssh -l john distant
ssh john@distant
as told in https://stackoverflow.com/questions/10197559/ssh-configuration-override-the-default-username , you can use a local config file (~/.ssh/config
) to change username on a host basis.
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加