Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

spawn ssh error "subsystem request failed on channel 0"

Status
Not open for further replies.

vinhnguyen18

Technical User
Aug 29, 2009
4
US
Please help.

I keep getting this error when I execute the following "spawn ssh...." command.


Here is my code:

spawn ssh $ip -l $username -s netconf < /cygdrive/c/pat/somefile.xml
expect {
"assword:" {
send -s "password\r"
expect "]]>]]>"
sleep 1
}
timeout {
puts "timeout"
exit
}
}

Getting this error:
subsystem request failed on channel 0

 
After digging around some Expect book, I found the solution to this:

spawn /bin/sh -c "ssh $ip -l $username -s netconf < somefile.xml
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top