yhelothar
Lifer
I'm looking at this guide here.
http://www.admin-magazine.com/Articles/Automating-with-Expect-Scripts/(language)/eng-US
It works to login to SSH but it doesn't seem to want to do anything after that.
The server that I SSH into has additional messages, would that pose an issue?
*************************************************************************
19940429 All users of this computer system acknowledge that activities on it
may be subject to monitoring; the privacy of activities on this
computer cannot be ensured. All computer account users are required
to read and abide by the ITS Computing and Usage Policies. Please
refer to the web page at:
http://www.usc.edu/its/policies/computing/
*************************************************************************
hpc-login2 is a 64-bit dual CPU with 4 cores each.
*************************************************************************
http://www.admin-magazine.com/Articles/Automating-with-Expect-Scripts/(language)/eng-US
Code:
#!/usr/bin/expect -f
spawn ssh aspen
expect "password: "
send "PASSWORD\r"
expect "$ "
send "ps -ef |grep apache\r"
expect "$ "
send "exit\r"
The server that I SSH into has additional messages, would that pose an issue?
*************************************************************************
19940429 All users of this computer system acknowledge that activities on it
may be subject to monitoring; the privacy of activities on this
computer cannot be ensured. All computer account users are required
to read and abide by the ITS Computing and Usage Policies. Please
refer to the web page at:
http://www.usc.edu/its/policies/computing/
*************************************************************************
hpc-login2 is a 64-bit dual CPU with 4 cores each.
*************************************************************************
Last edited: