I have created a shell script which will automate login to a remote machine.
But I need to automate the execution of commands or shell scripts also along with this script.
What modification do I need to do with shell script for creating a directory(for example!) in the remote machine ?
#!/usr/bin/expect
set login "root"
set addr "10.3.2.0"
set pw "root"
spawn ssh -t $login@$addr
expect "$login@$addr's password:"
send "$pw\r"
interact
Thanks in advance.