Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Notices

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-26-2008, 07:14 PM
phillip phillip is offline
Registered User
 
Join Date: Aug 2008
Posts: 3
SSH to a UNIX server via a gateway machine

Hi,

To connect to my target machine, I have to first to one or more gateway server(s).

In order to automate the process I have written a vbs script to logon to each gateway server in turn and sending the password as required via the WaitForStrings method.

This is an example of what I am trying to do:
I am running SecureCRT on my PC, a.
I want to log onto UNIX server b.
To reach server b I first need to log onto server C.
From a's SecureCRT, I create a session onto C. Then the script issues a "ssh b" and when b prompts for a password the script sends it.

Is there a smarter way of doing this via SecureCRT? I know I can make the servers "trusted ssh" but this is not allowed by the site. Also I know I can use ssh tunnelling but once again this is not allowed by the site.
Reply With Quote
  #2  
Old 08-27-2008, 10:47 AM
darkoth darkoth is offline
Registered User
 
Join Date: Jun 2007
Posts: 29
I worked for a company that did it that way for a while. basically I just stayed logged into the gateway box. Pretty much what your doing now... I can't think of another way ATM.
Reply With Quote
  #3  
Old 08-27-2008, 11:28 AM
kbarnette kbarnette is offline
VanDyke Technical Support
 
Join Date: Aug 2007
Posts: 585
Hi phillip,

It does sound like, within the restrictions you have described, the scripting method you have implemented is the most effective way of accomplishing what it is you are looking to do.

Is there anything about this method that is currently not working for you?
Reply With Quote
  #4  
Old 09-02-2008, 05:57 PM
phillip phillip is offline
Registered User
 
Join Date: Aug 2008
Posts: 3
SSH via gateway machine

My chosen method does work OK most of the time.

As with anything that waits for prompts you can get synchronisation problems. Also prompts can change or you get unexpected response like change your password.
Reply With Quote
  #5  
Old 09-03-2008, 11:07 AM
kbarnette kbarnette is offline
VanDyke Technical Support
 
Join Date: Aug 2007
Posts: 585
Hi Phillip,

While it may be difficult to make provisions for every eventuality, there may be a way to deal with some of the irregularities that may be encountered.

Would you please post your script, so that I can determine if there might be an easy way to accomplish this?
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 02:04 PM.