Questions tagged [known-hosts]
44 questions
2
votes
1 answer
Stop Jenkins from modifying known_hosts
I have a Jenkins installation in CentOS 6 where the known hosts file, /var/lib/jenkins/.ssh/known_hosts, is under configuration management.
It contains, for instance, a key to a source control host by hostname (suppose its IP is…

Ed I
- 143
- 5
2
votes
1 answer
Duplicate entries are added to known_hosts file on every login
I have .ssh/config file in this format:
Host ABC
Hostname example.com
HostKeyAlias ABC
CheckHostIP yes
StrictHostKeyChecking no
Port 1001
User userABC
Host CDE
Hostname example.com
HostKeyAlias CDE
CheckHostIP yes
StrictHostKeyChecking no
Port…

Serge
- 21
- 2
2
votes
1 answer
Known Hosts ECDSA Host Key Multiple Domains on One IP
Hello, world!,
I have a VPS set up with multiple domain names pointing to it. Arbitrarily, I like to access it via SSH through the domain name I'm dealing with. So for example, if I'm doing something with example1.com, I'll log in with ssh…

Jonah
- 169
- 2
- 9
2
votes
1 answer
Configure a host to be a known one for SSH for all users
Context: Modern Ubuntu server.
We have a certain host that should be known to all users on all machines. This is to avoid interactive prompt on first connect to it (which fails in non-interactive mode).
Is there a way to configure this OS-wide,…

Alexander Gladysh
- 2,423
- 8
- 31
- 49
2
votes
2 answers
I want non-interactive first ssh access
I would like to access my new virtual server in the cloud with ssh from an install script so that it does not ask for user interaction. When I use plain
ssh -i keys.pem user@host.com
it does tell me that this is a new host, do I trust it? As I…

Gergely
- 23
- 3
2
votes
4 answers
How can I keep SSH's know_hosts up to date (semi-securely)?
Just to get this out in front so I am not told not to do this:
The machines in question are all on a local network with little to no internet access (they aren't even well connected to the corporate network)
Everyone who has the ability to setup a…

Chas. Owens
- 2,053
- 2
- 21
- 24
2
votes
1 answer
Can I set SSH known_hosts to ignore a specific hostname?
I've set up a few headless Raspberry Pi systems using a Raspbian system image lately. They default to using the zeroconf domain name raspberrypi.local. Before I can change it, I have to connect to the new server with SSH, which always barks at me:
>…

Robert
- 117
- 6
2
votes
0 answers
Remove BOTH ssh key for IP and ssh key for FQDN from known_hosts
Is it possible to remove an ssh key from known_hosts both for the IP and for the FQDN of a machine, knowing only one of the 2?
For example, I am on machine A, and I want to remove the public ssh key of machine B (whose IP is 1.2.3.4) from A's…

Michele Piccolini
- 121
- 2
1
vote
3 answers
How to automatically delete the key line from known_hosts when a session is closed?
I'm working on automating a whole environment by using AWS CloudFormation and during the testing period I'm required to kill and re-create the servers very often.
The servers are configured to set their IP addresses from a dedicated pool which means…

Itai Ganot
- 10,644
- 29
- 93
- 146
1
vote
1 answer
Upgrade path for HostKeyAlgorithms
I'd like to change the default setting for HostKeyAlgorithms for all SSH connections to prefer ssh-ed25519 over ecdsa-sha2-nistp256. But I currently have ecdsa-sha2-nistp256 host keys for many hosts in my known_hosts file (about 70). When I connect…

Feuermurmel
- 161
- 1
- 1
- 9
1
vote
0 answers
Warning: Remote host identification has changed (SSH)
Most likely someone did a server update last night, because when I try to do a rsync (from win 7) I get the message (short version):
WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
It is possible that a host key has just been changed.
The…

Steven
- 275
- 2
- 9
- 21
1
vote
1 answer
How to save ssh-keyscan result with the port to .ssh/known_hosts
When I run
ssh-keyscan -p NNN -t rsa GITHOST
it produces sting like
GITHOST ssh-rsa…

kmmbvnr
- 111
- 1
- 3
1
vote
1 answer
Adding address to known_hosts command line
I am having trouble adding an IP to known_hosts from command line. I have a mysql backup script that is supposed to upload files to an other server using sftp. The script works fine, but you have to run sftp command manually once to add the ip to…

Firze
- 355
- 6
- 16
1
vote
1 answer
SSH known_hosts holds duplicate keys for same server
I notice my local ~/.ssh/known_hosts file has two entries for the same machine on the local LAN:
somemachine,192.168.1.200 ssh-rsa KEY...
somemachine.search.domain ssh-rsa KEY...
It's the same key, the second one doesn't have the IP though. Is…

xref
- 273
- 3
- 14
1
vote
3 answers
Generating SSHFP record from OpenSSH known_hosts file entry
I have an entry from an OpenSSH known_hosts file; I'd like to generate an SSHFP resource record for this. I can use ssh-keygen to generate the fingerprint with no difficulty:
$ ssh-keygen -f foo_known_host -l
1040…

cjs
- 1,385
- 1
- 12
- 23