I want to automate my support work. I want to make a script that will connect to a server and do some CRUD operation on the server and again return to local machine. I don't want to upload the script.Till now I have made a script that will help to connect to the server but i am not able to do any any other operations through. Is it possible to run a local script on the remote server?
My script:
!/usr/bin/expect
set ip neviss
set user user
set password 1234
spawn ssh "$user\@$ip"
expect "Password:"
send "$password\r";
interact ( after this line any command is not getting executed)
ls -lrt