I made a bash script to automatically update a object-group on a Cisco ASA with office365 IPs via SSH.
I'm getting the IPs from MS, building the right command-syntax for the ASA, and writing all commands in a file (right now 90 lines, but as this is dynamic it can grow or shrink). Then I want to push the commands in the file to the ASA with:
cat outfile.txt | sshpass -p "Password" ssh -t -oStrictHostKeyChecking=no foo@1.1.1.1
but sshpass stops sending commands after line 70. so outfile.txt has 90 something lines but no matter on which host I try to "deploy" the commands, it just send's the first 70 lines. After that i just get a
Connection to 1.1.1.1 closed by remote host.
On the firewall I see a TCP reset from the server, but as I said it doesn't matter on which host (tried different Firewalls, Routers and other servers) I try it won't send more than the first 70 lines.
Anyone got a solution for my problem or another way to achieve my problem?
Thanks