Reply To: (Solved) SSH :direct access to the Shell Prompt ?

Home Page Forums Network Management ZeroShell (Solved) SSH :direct access to the Shell Prompt ? Reply To: (Solved) SSH :direct access to the Shell Prompt ?

#52347

reaperz
Member

I use “expect” to manage zeroshell and other stuff remotely. Fore example:

#!/usr/local/bin/expect

exp_version -exit 5.0

set timeout 60
spawn ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no admin@192.168.0.1
expect “admin@192.168.0.1’s password:”
send “adminpasswdr”
expect “Z e r o S h e l l”
send “S”
expect “admin password:”
send “adminpasswdr”
expect “>”
send “wc -l /proc/net/ip_conntrackr”
expect “>”
send “exitr”
close