backup config files by tftp

#!/usr/bin/expect -f
set timeout 60
spawn ssh admin@fgt-ipaddress
expect “password: $”
set send_slow {1 0.05}
send -s “password\r”
send_user “password\r”
send -s ” config global\n”
send -s “execute backup full-config tftp filename.txt tftp-ipaddress\n”
send -s “exit\n”
interact

http://www.firewall1.nu/?p=28

http://phpsrv.nutn.edu.tw/~silent/archives/113

http://plog.tcc.edu.tw/post/128/2034

 

檔案上傳至linux tftp時,目錄必須有此檔名存在,並且可寫入。

arrow
arrow
    全站熱搜

    igogo 發表在 痞客邦 留言(0) 人氣()