remote-lab.net learn by doing

Cisco devices SSH autologin

Below is a quick expect script that enables you to autologin on Cisco devices with a predefined clear text password by using an OpenSSH client :


#!/usr/bin/expect
set password "yourverycleartextpassword"
spawn ssh [lindex $argv 0] -o PreferredAuthentications=keyboard-interactive,password
expect "Password: "
send "$password\r"
interact
exit