Juniper firewall backup using ssh from linux
Our network team has many firewalls.To take backup, we had written script by connecting to that firewall using telnet and taking backup, all went well. Now to increase security, we have planned to use ssh instead of telnet. But I am able to login via script but the command seems to be not executed. The script is as follows
# set Variables
set ipaddr [lrange $argv 0 0]
set username [lrange $argv 1 1]
set password [lrange $argv 2 2]
set enpassword [lrange $argv 3 3]
#set enpassword [lrange $argv 3 3]
#set arg1 [lrange $argv 4 4]
#set timeout -1
# spawn a new telnet session
spawn ssh -c des $username@$ipaddr
#check for the password prompt
send -- "$password\r"
send -- "get config\r"
send -- "exit\r"
send -- "\r"
When I run the script I receive the following in logs
spawn ssh -c des backup@*.*.*.*
No valid ciphers for protocol version 2 given, using defaults.^M
Remote Management Console
fircom-> Connection to *.*.*.* closed
backup is not happening successfully. I am doing something wrong, I could not find that out. Kindly help
Last edited by Iyyappan; 08-04-2012 at 10:55 AM.