View Single Post
  #3  
Old 05-18-2021, 06:38 AM
mohenoun mohenoun is offline
Registered User
 
Join Date: Nov 2020
Posts: 22
Script works for some hosts but not all

Hello,

I'm stuck on this part, as the script works fine for some hosts but not all.

I connect through a jumpbox and it works fine with the script for some routers and not for other.

I think it has something to do with the way it's connecting.

When I connect to Router A for example manually, I connect through a session to a jumpbox and I get : jumpbox# where I input my command to connect :

jumpbox#ssh -l UID Router

Then I get a prompt to input my password.


Is there a way to replicate the same command below.

I mean is there way to connect directly inputing the password without any interactive keyboard ?

Thanks.

Code:
strConnectString = _
                    g_strFirewall & _
                    " /SSH2 " & _
                    " /L " & g_strUsername & _
                    " /AUTH password,keyboard-interactive /PASSWORD " & g_strPassword & _
                    " " & g_strHost

                strConnectString = _
                    g_strFirewall & _
                    " /SSH2 " & _
                    " " & g_strHost

Last edited by cboyack; 05-18-2021 at 07:06 AM. Reason: Please use [CODE] and [/CODE] tags to denote areas of code
Reply With Quote