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
Use ssh command with -t options. For example:
ssh
-t
ssh -t myremotehost 'uptime' name@myremotehost's password: 10:14:14 up 91 days, 21:20, 5 users, load average: 0.20, 0.35, 0.36