Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Secure Shell

Reply
 
Thread Tools Display Modes
  #1  
Old 06-17-2013, 04:52 AM
Amit Suri Amit Suri is offline
Registered User
 
Join Date: Jun 2013
Posts: 3
The client has disconnected from the server. Reason: The server's host key failed to

I am also facing this issue:Secure CRT version Version 6.6.2

I have a VB script which does a ssh to a networking device .Script runs fine for some time and after soem time it throws a error connection failed and The client has disconnected from the server. Reason:
The server's host key failed to verify. This could mean that the server you are connected to is impersonating the server it claims to be. A connection could not be established.

IS there a solution to this ?


crt.session.Connect("/SSH2 /L XXXXXX /PASSWORD XXXXXX & A.A.A.A")
Reply With Quote
  #2  
Old 06-17-2013, 07:41 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi Amit Suri,

I am sorry to hear that you are having trouble with an older version of SecureCRT.

Can you explain how your script runs for some time successfully, and then you see the error?

Have you confirmed that the host key fingerprint matches what you have on record?

You can find a PDF that explains host keys at the following location:
http://www.vandyke.com/solutions/hos.../host_keys.pdf
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #3  
Old 06-17-2013, 11:02 PM
Amit Suri Amit Suri is offline
Registered User
 
Join Date: Jun 2013
Posts: 3
SSH failing with error:The client has disconnected from the server. Reason: The serv

Hello ,

I am using a script to SSH into a L3 device .it works for some time and then throws a error connection failed followed by this message :

The client has disconnected from the server. Reason: The server's host key failed to verify. This could mean that the server you are connected to is impersonating the server it claims to be. A connection could not be established.


Secure CRT Version 6.6.2 (build 350). IS this any known problem ?
Reply With Quote
  #4  
Old 06-17-2013, 11:35 PM
Amit Suri Amit Suri is offline
Registered User
 
Join Date: Jun 2013
Posts: 3
The client has disconnected from the server. Reason: The server's host key failed to

Hello Todd,

Thank you for the reply .

My script runs in loop: it Logins to the device using SSH , check some values and the log out.I does it in a loop . When I start , initally it works for say 10-15 minutes and then later it pops a messahe connection failed and the ssh error which I pasted in my last post


Also, the link which you gave looks wrong : http://www.vandyke.com/solutions/hos.../host_keys.pdf


Please correct me if I am wrong , but host key mismatch will not allow me to log in at all ,however, here, I am able to login for some time and then it fails



=========================================

Code:
# $language = "VBScript"
# $interface = "1.0"

Sub main

while 1

  logfile = "C:\logging_1.txt"
  crt.Session.LogFileName = logfile
  crt.Session.Log True, False, False


  crt.session.Connect("/SSH2 /L XXXXXX /PASSWORD XXXXXX & A.A.A.A")
  crt.Screen.WaitForString "AAA" , 5
  crt.Screen.Send "get session info" &Vbcr
  crt.Screen.WaitForString "AAA" , 5
  crt.sleep 1000

  dim fso, file, strline, parser1, parser2, parser3, parser4
  Set fso = CreateObject("Scripting.FileSystemObject")
  Set file = fso.OpenTextFile(logfile, 1, False)
  file.readline
  file.readline
  strline = file.readline
  parser1 = split(strline,"/")
  parser2 = parser1(0)
  parser3 = split(parser2," ")
  parser4 = parser3(1)

  if parser4 > 850000 then
       crt.screen.send "clear session all" &Vbcr
  end if

  crt.sleep 100           'sleep 2 second, can suggest customer to sleep long time
  crt.session.log False
  crt.session.disconnect

wend  

end sub

Last edited by rtb; 06-19-2013 at 09:12 AM.
Reply With Quote
  #5  
Old 06-19-2013, 09:11 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi Amit Suri,

I pointed you to the white paper about SSH2 host keys because of the issue you posted.

One way for the message you are seeing to appear is if the host key changes. If the host key is changing in the middle of running your script, you may want to investigate what is causing that.

If the host key is not changing, then there may be another reason that you are seeing the message. Have you confirmed that the host key fingerprint is correct when you see the message?

Are you connecting to a single device, or is it possible that the IP address you are using is a generic IP address for a load balancer or a cluster?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 08:59 PM.