#!/usr/bin/expect -f # Author: Athmane Madjoudj set timeout 2 spawn ssh -o StrictHostKeyChecking=no sshtest@localhost /bin/cat ssh_test_file send -- "\r" expect eof