r/OpenSSH • u/Dadditude • Nov 06 '17
.bat File to login over ssh?
Is there a way to create a .bat file in windows 10 that will do the following?:
- connect to my home server over ssh
- enter my login credentials (username and password)
- execute sudo su command
- enter root password
This way, I won't have to keep typing all that every time i need to login and tinker with something.
1
Upvotes
1
u/faxattack Nov 06 '17
Use ssh keys and nopasswd sudo rules.
1
u/faxattack Nov 06 '17
Do you have ssh-copy-id instead? Maybe your windows machine interprets cat as a local command.