Can't find the solution.
I need in the script - ssh to a server then change to root via
sudo /usr/bin/rootsh -i -u root
. Then make some action then go back and carry on with script... Something like
...
ssh -t myserver
EOF
...
If I do it this way - doesn't work.
If done in the way
ssh -t myserver 'sudo /usr/bin/rootsh -i -u root ;whoami'
I can do ssh and then switch to root, but then script wait until session/shell closed.
Asked by Ivo Babinec - Leo
(41 rep)
Jan 30, 2020, 01:07 PM
Last activity: Jan 30, 2020, 03:39 PM
Last activity: Jan 30, 2020, 03:39 PM