Hi,
I am using 'expect' to automate ssh password authentication. When I run the script in SunOS, I find the spawned ssh process gets killed once the below script is completed. This is not the case in Linux. How do we avoid it? Should we ignore the SIGCHLD signal somehow? Is there anyway to determine through this script if spawned process is successful and report error if any?
#!/usr/local/bin/expect -f
set password blah-blah
spawn ssh -NfL 8002:<test domain>:22 [email protected]
expect "* password:*"
send -- "$password\r"
send -- "\r"
expect EOF
-Karthik