I want to connect from ServerA to ServerB , and check Oracle Database Status and PendingLogs then record results, and use the result on ServerA ,and compare with the result on serverA and generate logs on serverA.
I used ssh -q root@192.168.11.131 sh -s < /root/script.sh > /root/output.txt
but I still have to enter password manually.
is there any way to turn off interactive login?
how can I run script file via
spawn ssh?
sshpass -f /path/to/myfile ssh user@localhostis not working on CentOS. I used expect , but in my commands I have Awk and it doesn't support. – Reza Nov 28 '16 at 12:15expect, it should not matter. You use it only to connect to the server, not to run any other tools (awk). – Jakuje Nov 28 '16 at 12:17