I am trying to log into a linux node using a shell script for which I have the username and password. So i want to run a few commands on that server and then I need to capture that output and I need to show it on a HTML page.
Now firstly I am facing issues with login into the server using a shell script (I even tried .BAT file), so need help regarding it.
My incomplete script is as below:
@echo off
cls
ssh [email protected]@nodename01.xxx.xxx.xxx01.xxx.com
pause
I need to enter the password when it asks in next step and also need to hit enter after it. Also after login need to pass 'Yes' when I log in for the first time.
Any help is appreciated in advance.
sshdoes not accept a password from stdin, and it does not have an parameter/option to pass one to it, therefore you'll need something likesshpass