Reply
Fry
ahazem
Posts: 1
Registered: 02-09-2009
0

Re: plink doesn't work

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

Golden
geertn444
Posts: 30
Registered: 11-28-2011
0

Re: plink doesn't work

I tried SSH in PERL (on Windows platform). Horrible...i gave up...

Moderator
Edwin Groothuis
Posts: 390
Registered: 10-19-2008
0

plink doesn't work

I once make a SSH wrapper in Perl to setup a CLI session, but didn't do the Expect style language in it. If you are interested in it, let me know.

Edwin
--
Edwin Groothuis - Riverbed Support

If this answered your question, please click "Accept as Solution" ------->
Golden
geertn444
Posts: 30
Registered: 11-28-2011
0

Re: plink doesn't work

Yes. I have just discovered this also :-) Thanks...

Administrator
cgeary
Posts: 941
Registered: 06-28-2010
0

Re: plink doesn't work

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


--------------------------------------------
Chris Geary - Riverbed Support
--------------------------------------------
If this answered your question, please click "Accept as Solution" ------->
Golden
geertn444
Posts: 30
Registered: 11-28-2011
0
Accepted Solution

plink doesn't work

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

‬‪‬‪‬‪