03-11-2012 01:54 PM
Hello,
I am using plink to read or write cli commands on rvbd steelheads since a while with no issue. plink utility included with putty might not work properly in case the SSH session keys are not stored in cache, so it might stop a batch file (normal windows .cmd file or command prompt .bat file).
You should use plink utility from Quest Putty, and include '-auto_store_key_in_cache" command attribute
here is a sample syntax "windows CMD"
plink -load {ssh session name to connect to SHA} -auto_store_key_in_cache admin@{primary_ip} -pw {admin's passwor
d} <{file includes your commands} >{file to save output}
Regards.
A. Hazem
02-17-2012 01:44 AM
I tried SSH in PERL (on Windows platform). Horrible...i gave up...
02-15-2012 12:55 PM
02-15-2012 08:29 AM
Yes. I have just discovered this also :-) Thanks...
02-15-2012 07:51 AM
Why not use a scheduled job? You can set that up in the CLI using the job commands.
eg:
conf t
job 1 command 1 "sh connections all"
job 1 date-time 15:48:00
job 1 recurring 86400
job 1 enable
If you want to test it now:
job 1 execute
And then:
ukdcsh1 (config) # sh job 1
Job 1:
Status: pending
Enabled: yes
Failure Continue: no
Run As: admin
Interval: 86400
Schedule Time: 2012/02/15 15:48:00 +0000
Commands:
Command 1: sh connections all
Last Execution:
Start Time: 2012/02/15 15:48:47
Finish Time: 2012/02/15 15:48:50
Output:
T Source Destination App Rdn Since
--------------------------------------------------
O 10.64.8.8 10253 10.64.9.32 135 EPM 64% 2012/02/15 15:48:22
O 10.64.8.8 10254 10.64.9.32 1077 TCP 2% 2012/02/15 15:48:23
O 10.64.8.8 10256 10.64.9.33 135 EPM 58% 2012/02/15 15:48:28
O 10.64.8.8 10257 10.64.9.33 1067 TCP 3% 2012/02/15 15:48:31
O 10.64.8.8 10258 10.64.9.34 135 EPM 61% 2012/02/15 15:48:37
O 10.64.8.8 10259 10.64.9.34 1028 TCP 70% 2012/02/15 15:48:38
02-15-2012 01:53 AM
Hello all,
I want to use plink.exe to script an SSH session to the Riverbed and run the "show connections all" command.
This is for a remote device in Singapore and i don't want to get up at 03:00 AM in the night, just to run this stupid command on the remote box :-)
I was very surprised when the Riverbed somehow detects that it is a scripted session and refuses to execute:
Opened channel for session
Started a shell/command
Riverbed ssh: ssh remote command is not allowed.
Server sent command exit status 1
Disconnected: All channels closed
Is there a way around this ? Some command on the Riverbed to allow remote commands ?
Or use another programmable ssh client ?
regards,
Geert
Solved! Go to Solution.
© Copyright 2012 Riverbed Technology. All rights reserved Riverbed.com | Contact Us | Technical Support | Terms & Conditions | Privacy Policy