Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8464593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T14:47:39+00:00 2026-06-10T14:47:39+00:00

I am using python Paramiko to connect using ssh to a remote ubuntu box

  • 0

I am using python Paramiko to connect using ssh to a remote ubuntu box hosted on a vps provider. Using a windows 7 based client machine, I am able to connect as follows:

import paramiko
import binascii
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect(hostname='HOSTNAME', username='USERNAME', password='PASSWORD')

This is all good, but now I want to verify the host server identity and because I’m on windows, Paramiko won’t be able to fetch the known_hosts file or something like it. I tried the following code:

#... after connection is successful
keys = ssh.get_host_keys()
key = keys['HOSTNAME']['ssh-rsa']
print binascii.hexlify(key.get_fingerprint())
# key.get_fingerprint() returns the md5 hash of 
# the public part of the key (whatever that means)

which is giving an output similar to the following:

a42273f83e62d65cc87231a2ba33eff3

The thing is, on my VPS provider’s cpanel, I have the RSA and DSA host key fingerprints listed as something like:

RSA 1b:c2:f4:8f:f2:86:fc:f2:96:ba:cc:24:41:e9:d7:86
DSA 36:b9:1f:ad:53:b5:c4:38:78:bf:cb:9d:38:fa:44:ce

and as can be seen none of the fingerprints match the generated one. How can I compare my manually generated fingerprint to the fingerprint values on the remote host’s cpanel? Is what I’m doing correct?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T14:47:40+00:00Added an answer on June 10, 2026 at 2:47 pm

    Solved, It turned out that the the RSA key fingerprint displayed in the control panel isn’t for the VPS host, it’s for an out of band special console. The actual key (of the VPS host) is located under: /etc/ssh/ssh_host_rsa_key.pub and the fingerprint value (its MD5 hash) is exactly what I was getting from the client side verification code. So there wasn’t any problem to begin with.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to execute a Python script on several (15+) remote machine using SSH.
I am using paramiko for executing remote commands in python. I want to log
I'm attempting to use Paramiko (Python SSH library) to read a remote file, and
Background I'm working on a graphical ssh client in Python. I'm using PySide for
I am using Python's paramiko packet to keep an ssh-connection with an server :
I am writing python script to login to ssh server using paramiko. I wrote
Using Python I want to randomly rearrange sections of a string based on a
Using python 2.6.5 on Windows XP, it seems I'm getting the wrong result when
Using Python 2.6, I wrote a script in Windows XP. The script does the
I want to run a tail -f logfile command on a remote machine using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.