Saturday, February 10, 2018

command line - How to switch user with pre-configured credentials in SSH Terminal after logging in as standard user

I am talking about authentication without needing user intervention like specifying password and username in the command file so that user don't need to input anything to switch user. For example: Logging into an SSH session can be something like: putty.exe "IP_ADDRESS" -l User_name -pw Password.


Because my server requires me to log into a standard user first before switching user to the root user, I want to automate this process. I have done the automating of logging into the session but I don't know how to do the same when switching user in the session. How do you include the switch user command with the password parameter in the command file which is executed by a batch file when trying to switch user?


Thanks in advance!

No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...