I am logging into remote machine through shell script (by placing ssh command in script). After ssh command ,The remaining lines of the script are getting executed on the curre
Is your login passwordless.
If yes, you can just use pipe to execute the statement on the remote machine
like:
cat myshellscript.sh | ssh blah@blah.com -q