Questions tagged [known-hosts]

SSH clients store host keys for hosts they have ever connected to. These stored host keys are called known host keys, and the collection is often called known hosts. In OpenSSH, the collection of known host keys is stored in /etc/ssh/known_hosts and in . ssh/known_hosts in each user's home directory.

17 questions
3
votes
1 answer

Permanently added the ECDSA host key for IP address '140.82.113.4' to the list of known hosts in Cpanel

When trying to link a Private repository in my GitHub to my CPanel, after taking all the necessary steps, when I get to the part where I insert my SSH Link in CPanel, I get this error. Error: (XID x7rhx7) “/usr/local/cpanel/3rdparty/bin/git”…
3
votes
2 answers

Git clone inside of newly created container - problem with known_hosts

I would like to ask how to solve the problem that when I try to git clone ... in the container it will fail due to that the server is not in known_hosts. Is there way how to force "yes" in: The authenticity of host '192.168.0.136 (192.168.0.136)'…
Jakub Znamenáček
  • 766
  • 1
  • 4
  • 18
2
votes
0 answers

Python PSFTP No hostkey for host x.x.x.x found

I am running Python 3.6.8 on RHEL 8 I am trying to connect to sftp on another server using this #!/usr/bin/env python import pysftp myHostname = I.I.I.I myport = PPPP myUsername = xxx myPassword = xxx cnopts =…
2
votes
1 answer

Bash: SSH: Checking if an IP or host with non standard port is in known_hosts

I'm trying to test if a SSH host has been connected to before in a bash script. It uses a non-standard port. I'm using a test as suggested from this question/answer, and I know for certain the SSH host in this test is in known_hosts, but the test…
nooblag
  • 678
  • 3
  • 23
1
vote
0 answers

How to create an instance of KnownHostsServerKeyVerifier for host key verification in the SSHClient of Apache Mina SSHD java library

I am trying to connect to a remote server using the SshClient of java library Apache MINA SSHD. I want to pass my known_hosts file also to the SshClient so that the hosts are also verified before connecting to the server. I need to use the class…
1
vote
0 answers

How to load known host key from String instead of filesystem?

I have a Spring Boot application with Apache SSHD. Therefore, the application needs a known host key. How to provide this known host key? For production I can use a static known_hosts file, but for integration test I need a dynamically generated…
dur
  • 15,689
  • 25
  • 79
  • 125
1
vote
1 answer

Openstack: How to find out VM's key fingerprint before first SSH session

When connecting to a new virtual machine (VM) over SSH for the first time, it is normal to get a message like this: The authenticity of host '▮▮▮.▮▮▮.▮▮▮.▮▮▮ (▮▮▮.▮▮▮.▮▮▮.▮▮▮)' can't be established. ECDSA key fingerprint is…
Frigo
  • 362
  • 2
  • 17
1
vote
1 answer

pysftp.CnOpts() 'No Host Keys Found' error despite known_hosts file generated using ssh-keyscan

I am trying to follow solution from Verify host key with pysftp. I run: import pysftp fn = r'C:\Users\UWAdmin\.ssh\known_hosts' cnopts = pysftp.CnOpts() cnopts.hostkeys.load(fn) but I get the error: HostKeysException …
Hud
  • 301
  • 1
  • 12
1
vote
1 answer

Navicat doesn't recognize new entries in known_hosts file on Mac and cannot connect to remote server

UPDATE Feb 2022: this issue may have been fixed in more recent versions. See comments on the accepted solution. Summary: An existing connection to a remote database in Navicat was working using a domain name for the SSH > Host field. After building…
Rick Gladwin
  • 4,225
  • 1
  • 17
  • 21
0
votes
1 answer

RSA host key for github.com differes from the key for the IP address (error re-appears after performing git push)

I understand this is due to the pub key change and followed the steps here to fix it: Why are connections to GitHub over SSH throwing an error "Warning: Remote Host Identification Has Changed"? However, everytime I perform the git push command, this…
0
votes
1 answer

Why are the IP addresses of the SSH host I connect to being added to my .ssh/known_hosts?

I'm updating multiple Ubuntu systems to respond to Update your Bitbucket Cloud SSH Host Keys. tl;dr: Bitbucket updated their SSH keys, so the clients must update their .ssh/known_hosts accordingly. At first, I tried to remove the old entries like…
0
votes
0 answers

How to update my known_hosts file for my jenkins container for github app authentication

So I am trying to set up our CICD pipeline to authenticate to github via a github app rather than a perosnal user token. So once I follow the instructions (https://docs.cloudbees.com/docs/cloudbees-ci/latest/cloud-admin-guide/github-app-auth) I run…
user3559247
  • 1,117
  • 1
  • 11
  • 21
0
votes
0 answers

How to get the `ssh-rsa-cert-v01@openssh.com` certificate from a server?

TL;DR Is there a way to obtain the complete certificate so I can add it to ~/.ssh/known_hosts so Cyberduck knows to trust the server? Doing ssh-keyscan -t rsa -c localhost on the server is not an option '-c' is not present. The whole story I wanted…
loco.loop
  • 1,441
  • 1
  • 15
  • 27
0
votes
1 answer

Update SSH key/RSA fingerprint for GitHub (Ubuntu-20.04) not working

My GitHub ssh key is expired. I tried to update it, which works on GitHub's site, but my laptop just shows me the old RSA fingerprint when I try to push/pull/clone. So currently, my laptop has no access to GitHub now. There a similar questions on…
0
votes
1 answer

Force ssh to use a particular algorithm for host identification

I am trying to better understand how ssh does host authentication. I am ssh'ing from a macbook pro (OSX 10.14.6) to several CentOS 8.1 servers. There are several files on the remote CentOS servers in /etc/ssh/ that are used for the host-based…
irritable_phd_syndrome
  • 4,631
  • 3
  • 32
  • 60
1
2