I'm not familiar with Plink or paramiko, but my co-worker (or cow-orker for you old-timers) Ted Cabeen wrote a RANCID modification to send commands to Adtran devices which works quite nicely. It's in perl but the concept is the same. Basically a smart wrapper for an expect script. See:
Thank you very much, RANCID looks like exactly what I need. I look forward to trying it out.
Has anyone been able to script SSH commands in AOS with a tool like Putty's plink.exe or Python's paramiko library? I can connect successfully with username/password authentication, but attempting to run any commands produces an error and immediately disconnects.
C:\>plink -ssh -v -l USERNAME -pw PASSWORD HOSTNAME "show version"
Opening session as main channel
Opened main channel
Server refused to start a shell/command
FATAL ERROR: Server refused to start a shell/command
Perhaps your script is looking for a specific prompt or syntax from the unit? "show version" should work without needing to be enabled. If you're looking to capture and record version and configuration info, RANCID with the Adtran plug-in is the way to go. We may tweak it to send "no events" before the main script as the occasional firewall log notice will sometimes get misinterpreted as a diff. Available from http://www.shrubbery.net/rancid/ The price is right, too.