Questions tagged [known-hosts]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer
2k views

Is it ok if I deleted the known_hosts file from .ssh folder?

I set up SFTP server in my local PC (Windows 10) but I made a mistake and deleted the "known_hosts" and "known_hosts.old" file in ".ssh" folder. When I check Recycle Bin, ...
HuynhMinh's user avatar
0 votes
1 answer
350 views

Why did GitHub site change?

Some time ago (long enough that I have forgotten the details), I successfully set up SSH authentication for my GitHub repository (along with corresponding keys in RStudio). It worked fine. But ...
Russ Lenth's user avatar
1 vote
1 answer
106 views

scp doesn't trigger initial prompt even though known_hosts is empty or deleted

I have a bash script to copy a file to a remote server using scp and expect. The script is as follows: #!/usr/bin/expect -f set port [lindex $argv 0] set file_to_send [lindex $argv 1] set login [...
CaTx's user avatar
  • 133
3 votes
1 answer
5k views

What are the restrictions to ssh StrictHostKeyChecking=no?

When running ssh with StrictHostKeyChecking=no, it should always accept CHANGED keys. However it does not in my case. This is documented in the man page (ssh-config): StrictHostKeyChecking ...
kuga's user avatar
  • 131
1 vote
1 answer
792 views

When is a new SSH host key generated?

I copied an EC2 instance from an AMI image and brought it back up. After that I had to remove the entry in my known_hosts file because the SSH host key fingerprint changed. However, I thought that the ...
AllRandomAllMid's user avatar
0 votes
0 answers
2k views

Getting message "The authenticity of host can't be established" but host is in known_hosts

I've just tried to connect to an SSH server to which I've connected before, but I'm getting this message: The authenticity of host '[HOST]:PORT ([IP]:PORT)' can't be established. D25519 key ...
laurent's user avatar
  • 6,069
0 votes
1 answer
951 views

Script SCP with public key

I need to configure a script to copy some files from one Ubuntu server to another. The key uses is allowed in the authorized_keys on remote server. I'm trying to configure this script: #!/bin/sh #...
Marco Ferrara's user avatar
0 votes
1 answer
1k views

Known_Hosts File

I have a couple of Raspberry Pis connected to an HP Windows 10 computer via an Ethernet LAN. When I ssh to either of the Pis from the HP I get the standard "ECDSA host key" warning. But the ...
RVB's user avatar
  • 1
0 votes
1 answer
5k views

When is it better to use ssh-keyscan instead of ssh to manage known_hosts?

When is executed ssh -i id_rsa_something [email protected] appears: The authenticity of host '192.168.1.2 (192.168.1.2)' can't be established. ECDSA key fingerprint is SHA256:ABCABC [fixed/...
Manuel Jordan's user avatar
0 votes
0 answers
258 views

ssh known_hosts seems to be ignored if using ssh as a launchd agent on MacOS

I have a service that acquires data with ssh. This works on linux in systemd, but in trying to do the equivalent on mac, I don't think the ~/.ssh/known_hosts file is being respected, because an ...
openCivilisation's user avatar
3 votes
0 answers
244 views

What is this entry in my ssh known_hosts file?

I was taking a look at my ssh known_hosts file, and it only included 2 entries. The first line was the GitHub keys, so nothing weird there. However, the second line had a bunch of Chinese text, which ...
cruzazulini's user avatar
8 votes
2 answers
35k views

How to see the list of known hosts Ubuntu

When I sshed into a remote client, I got a warning : Warning: Permanently added 'xx.xx.xx.xx' (ECDSA) to the list of known hosts. Where can I see the list of known hosts? I tried cat ~/.ssh/...
Roshin Raphel's user avatar
0 votes
1 answer
766 views

How to write a Know_hosts file with md5 format?

I am trying to make a program that automates ssh connections. It can also be used in Windows, so as Putty only accepts MD5 fingerprint format for the hostkey I am trying to make ssh accept MD5 too: ...
Roger Coll's user avatar
0 votes
1 answer
102 views

can I group the servers inside known_hosts file?

I was wondering if there is a way to group servers inside the known_hosts file something like this: [AWS] 11.xx.x.1 ecdsa-sha2-nistp256 xxxx= 11.xx.x.2 ecdsa-sha2-nistp256 yyyy= 11.xx.x.3 ecdsa-sha2-...
Kingindanord's user avatar
0 votes
1 answer
73 views

force scenario about REMOTE HOST IDENTIFICATION HAS CHANGED

everyone know the following message "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r", "@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @\r", "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...
King David's user avatar
12 votes
3 answers
47k views

SSH - How to add host to ssh/known_host file

The known_hosts file looks like this :- [localhost]:8001 ssh-dss AAAAB3NzaC1kc3MAAACBAP1/U4EddRIpU [10.18.60.198]:8001 ssh-dss AAAAB3NzaC1kc3MAAACBAP1/U4EddRIpUt9 // key are trimmed at the end ...
Tarun's user avatar
  • 171
38 votes
2 answers
57k views

Configure ssh-key path to use for a specific host

When connecting via SSH my terminal wants to use id_rsa by default. I don't want to use that key for this particular server. So I am forced to specify the proper key path when connecting: This works ...
MastaP's user avatar
  • 483
0 votes
1 answer
3k views

Automate adding host and IP to known hosts

I wanted to get rid of some warnings I'm getting when running an automated builds environment (Scrutinizer-CI, to be precise). Digging here, I've found this solution I can add to the script which ...
Andrea Sciamanna's user avatar
4 votes
2 answers
34k views

How to add SSH known host to known host file on Windows?

The known_hosts file does not look trivial. On Windows I see it contains hostname, ip address and some RSA key. On linux I see it contains several keys separated by bar. Who manages this file on ...
Dims's user avatar
  • 12.7k
19 votes
1 answer
35k views

Differing SSH known_hosts formats

I've been having issues with my CI server's deployment lately due to the client (CI) rejecting the remote's host key (despite it being present in known_hosts). I was stumped until today, when I ...
caseif's user avatar
  • 293
1 vote
1 answer
365 views

how to correct two host names in known_hosts

I'm trying to use ssh-keygen -R to remove a host line. However, each time I attempt this I get a zsh: no matches found:. When I look at the known_hosts file the line I want to modify starts like this [...
icicleking's user avatar
0 votes
1 answer
4k views

SSH Multiple lines for the same public key in known_hosts?

Recently, after some time, I have tried to login to my ssh server on the LAN, and I got this warning: $ ssh [email protected] Warning: Permanently added the RSA host key for IP address '192....
user3019105's user avatar
0 votes
1 answer
45 views

Cloning Ubuntu "clusters" with ssh access

I have a "cluster" with multiple Ubuntu (12.04) machines, all with the same accounts. From any machine, I need to ssh to any other machine. I set up ssh, generated keys, known_hosts file, and tested ...
emmeydsch's user avatar
0 votes
2 answers
6k views

How to display the mac address of known host by ssh

I want to know the MAC address of a machine that I don't have access to at the moment. However, I have a known_hosts file from ssh with a valid entry, and given that I get warnings about changing MAC ...
user1978011's user avatar
1 vote
1 answer
263 views

protect the known_host file from writing - good or bad idea?

I want to protect the known_host file from writing So I want to perform the following steps on my Linux red-hat server Cp /dev/null /root/.ssh/known_hosts chattr +i /root/.ssh/known_hosts I want ...
maihabunash's user avatar
2 votes
1 answer
419 views

Known hosts file keeps getting deleted

Have a weird issue where my known_hosts file is getting deleted periodically. Is there any way I can watch the file to see what may be deleting it? Any OSX logs that can be monitored to see what might ...
sgargan's user avatar
  • 131
0 votes
1 answer
564 views

Host angularjs.org not found: 3(NXDOMAIN)

My MacBook Pro OSX 10.9.4 has network problems now, and I cannot figure it out what is causing the problem. Today I am not able to access angularjs.org with any browser, but I can access other ...
Tiago Alves's user avatar
0 votes
2 answers
2k views

Cent OS 6 - Do I need to restart a service after updating .ssh/known_hosts

After updating my .ssh/known_hosts file do I need to restart a service? I tried service ssh restart but it gives ssh: unrecognized service.
VenomFangs's user avatar
5 votes
0 answers
2k views

How to convert Putty registry entry to known_hosts format?

Using Putty, I connected to a remote host. As this was a first time me doing so, as expected, ssh key was added. Google helped me find registry entry, but it is not in a known_hosts format. How can ...
JAM's user avatar
  • 479
15 votes
2 answers
8k views

SSH: known host with dynamic address

I need to connect to a host with a dynamic IP address. Every time its IP changes, SSH prompts me the fingerprint validation thing: The authenticity of host '...' can't be established. RSA key ...
peoro's user avatar
  • 1,151
4 votes
2 answers
5k views

Copying known_hosts between computers?

Connect to a server using OpenSSH_5.9p1 OpenSSL 1.0.1, and it stores a .ssh/known_hosts that's of the format: |1|wwwwwwwwwwwwwww=|wwwwwwwwww= ecdsa-sha2-nistp256 AAAAAAAAAA+AAAAA= Then copy that ...
OJW's user avatar
  • 2,287
91 votes
1 answer
32k views

How do I extract fingerprints from .ssh/known_hosts?

My laptop has a well-populated ~/.ssh/known_hosts file. I'd like to leverage that when connecting to remote hosts from my desktop, since tracking down the fingerprints can be a real chore. However, I ...
Tim has moved to Codidact's user avatar
1 vote
2 answers
13k views

Create a new known_hosts file for openSSH in windows

So i have OpenSSH in windows 7 at a university and i am basicly having this problem: When i first use SSH it is trying to create the known_hosts file on my university network drive H: But this is ...
Fantastic Mr Fox's user avatar
3 votes
1 answer
1k views

known_hosts file doesn't get populated anymore

I had a populated known_hosts file. I was editing it and for a split second I saw a permission error when I saved it. I went to check what the error was and the known_hosts file was blank. Now if I ...
garg's user avatar
  • 186
135 votes
3 answers
182k views

Where does Putty store known_hosts information on Windows?

How do I tell if Putty already knows about and has cached credentials for specific ssh servers? Another way to ask this question is what is the Windows/Putty equivalent of a unix/ssh known_hosts file?...
Hitesh's user avatar
  • 3,051
4 votes
3 answers
4k views

Can I use ssh host key verification with a round-robin DNS?

I'm logging into a server based on a round-robin DNS hostname -- "login.example.com" could go to any of a number of servers. Ideally, I'd like to be able to update my known_hosts file such that ...
Coderer's user avatar
  • 1,620