tcsetattr ~ICANON: Invalid argument
Posted: Fri May 19, 2017 6:43 am
Hi,
I'm writing a backup program which SSH's into the Device, pulls of the config, and then stores this where we want it to, the TFTP Backup isnt practical for us.
This works fine if I do it for a Cisco, Juniper, Mikrotik Etc.
However when I run a quick test using the below command it does show the data, but seems to error in a loop:
sshpass -p 'password' ssh -p 22 -o StrictHostKeyChecking=no admin@'ip' < netonix-commands.txt
The netonix-commands.txt file looks like this:
cmdline
cat config.json
exit
tcsetattr ICANON: Invalid argument
tcsetattr ~ICANON: Invalid argument
tcsetattr(): Invalid argument
tcsetattr ICANON: Invalid argument
tcsetattr ~ICANON: Invalid argument
tcsetattr(): Invalid argument
tcsetattr ICANON: Invalid argument
tcsetattr ~ICANON: Invalid argument
tcsetattr(): Invalid argument
tcsetattr ICANON: Invalid argument
tcsetattr ~ICANON: Invalid argument
Thanks
Mike
I'm writing a backup program which SSH's into the Device, pulls of the config, and then stores this where we want it to, the TFTP Backup isnt practical for us.
This works fine if I do it for a Cisco, Juniper, Mikrotik Etc.
However when I run a quick test using the below command it does show the data, but seems to error in a loop:
sshpass -p 'password' ssh -p 22 -o StrictHostKeyChecking=no admin@'ip' < netonix-commands.txt
The netonix-commands.txt file looks like this:
cmdline
cat config.json
exit
tcsetattr ICANON: Invalid argument
tcsetattr ~ICANON: Invalid argument
tcsetattr(): Invalid argument
tcsetattr ICANON: Invalid argument
tcsetattr ~ICANON: Invalid argument
tcsetattr(): Invalid argument
tcsetattr ICANON: Invalid argument
tcsetattr ~ICANON: Invalid argument
tcsetattr(): Invalid argument
tcsetattr ICANON: Invalid argument
tcsetattr ~ICANON: Invalid argument
Thanks
Mike