Hi All,
I need to prepare a script.
Description:
Currently i am in server "x(ubuntu os)", here i need to develop a script to ssh to another server "y(ubuntu os)", i have password less authentication to "y". i have done the below
#!/bin/bash
#ssh to the server "y" and confirming i am in "y"
ssh y | echo "$hostname"
-
-
-
once i execute the above script..it is getting structed.. Mainly i want to execute some commands and i want to come out to my old server "x" after executing the script.
Kindly suggest me to finish this script effectively.
Thanks a lot.