Search Results

Search: Posts Made By: mohanm
10,602
Posted By mohanm
try using here document in shell script to...
try using here document in shell script to achieve your requirement

ssh srom@$a << EOF
password
/usr/local/bin/sudo su -
Scripts_you_to_run
exit
EOF
10,602
Posted By mohanm
you can use ssh to directly run commands on...
you can use ssh to directly run commands on remote server like this

ssh root@remote_host "/tmp/script.sh"

This will prompt you for password, unless you have copied your local user's public key...
Showing results 1 to 2 of 2

 
All times are GMT -4. The time now is 01:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy