Questions tagged [known-hosts]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
24 views

ECDSA host fingerprint changes if the host is already known

I'm using a web hosting service that offers both FTP and SSH access, but for SSH they only allow authentication via SSH keys. I've generated myself SSH keys using ssh-keygen, imported them into my ...
2
votes
1answer
58 views

how to create status of REMOTE HOST IDENTIFICATION HAS CHANGED when performing ssh to remote machine for testing

We want to cause the status from a remote Linux machine to return "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r", "@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @\r", "@@@...
0
votes
1answer
29 views

SSH host key check fails on Debian version, but not on MacOS version

I have this strange situation with host-key checking. ssh -v github.com: works with "OpenSSH_7.9p1, LibreSSL 2.7.3" on MacOS Mojave (10.14.5 (18F132)): debug1: Server host key: ssh-rsa SHA256:...
0
votes
2answers
233 views

ssh-keyscan does not read .ssh/config?

I am using ssh-keyscan in a shell script to accept keys for hosts. The hosts are identified by hostname but not in /etc/hosts. They are in ./ssh/config so I can ssh <hostname> but I can not ...
0
votes
2answers
973 views

known_host for SSH connection

I program an application in Java. This application make a connection between two PC (One Windows and One Linux). My application must make a connection and make few commands. Among commands, I want ...
1
vote
3answers
564 views

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 ...
2
votes
1answer
2k views

Public Key Authentication Windows Port of OpenSSH

I have been attempting to get Public Key Authentication working with the PowerShell port of OpenSSH onto a VM running Windows Server 2012 R2. I have faithfuly followed the installation instructions ...
1
vote
2answers
1k views

SSH known_hosts with a dynamic IP

I have a machine behind a firewall. I connect to it remotely using a VPN tunneling with a port forward through ssh. To connect to the machine I use the external IP of the VPN and my personal and ...
1
vote
1answer
111 views

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 ...
-1
votes
1answer
210 views

ubuntu // running an ssh command as a specific user

I'm looking to add github to known_hosts for the deploy user when the command is ran by the root user. The command would be : ssh -T -o "StrictHostKeyChecking no" git@github.com Using cloudinit, it ...
2
votes
1answer
586 views

OpenSSH adds <IPv6>%2 to known_hosts

When I connect to a CentOS 7 host with IPv6 my ssh client always adds <IPv6 host addr>%2 to known_hosts even though the host key for this host (with the host's IPv6 address) is already present ...
1
vote
0answers
2k views

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 ...
0
votes
0answers
2k views

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 ...
4
votes
2answers
1k views

Does Terraform Deal with “known_hosts” upon changing infrastructure? If so, how?

I'm very new to terraform so maybe this is not a great question. But I'm running through [this Amazon EC2 example] and at one point it tries to SSH to the machine, I assume to install nginx. This is ...
32
votes
2answers
2k views

Is there a security risk to disclosing your SSH known_hosts file?

I'm speaking at a conference next week about some software tools I've created. My laptop will be shown on a projector screen during this presentation. The presentation will be videotaped and posted ...
1
vote
1answer
1k views

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 ...
3
votes
2answers
15k views

Add remote host to known_hosts file without prompt [duplicate]

I wrote some scripts and wish to add a remote host to my known_hosts file without any interaction. I can run a command like ssh -o "StrictHostKeyChecking no" root@10.x.x.x which will add the remote ...
9
votes
5answers
35k views

Auto accept rsa key fingerprint from command line

I've tried yes | ssh root@10.x.x.x to try to accept the RSA key fingerprint, but am still prompted if I'm sure I want to connect. Is there a way to make this automatic?
2
votes
1answer
1k views

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 ...
0
votes
1answer
9k views

Cant find “known_hosts” file

one short and probably stupid thing is annoying me... I can't find my 'known_hosts' file on my Windows Server 2008 but it must exist. On the server I have a git-repository that others can access and ...
6
votes
3answers
354 views

Same IP on many systems in different environments

I work in an environment where there are multiple locations, and in each locations we have the same IP addressing scheme, that is, we have many machines (one in each location) that share the same IP ...
-2
votes
1answer
3k views

~/.ssh/known_hosts file - how to set it up? [duplicate]

I'm trying to SCP a file from my server to another server. The command I'm using is: scp -i private.ppk -P 22 foo.txt someuser@domain.com:/home/someuser/foo.txt When I run this via the command line, ...
1
vote
1answer
914 views

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 ...
2
votes
1answer
3k views

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 ...
0
votes
1answer
1k views

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,...
57
votes
2answers
75k views

scp without known_hosts check

Is there any chance to skip the known_hosts check without clearing known_hosts or disable it in ssh.conf? I neither have access to known_hosts nor ssh.conf yet. Don't find any suitable in man.
2
votes
1answer
92 views

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 ...
2
votes
2answers
332 views

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 ...
0
votes
6answers
237 views

Sed regexp /d deleting whole file

Given a typical known_hosts file: [123.45.67.89]:22 ssh-rsa bbuivvhbkbjdnflksndkfnksnfk... [98.76.54.32]:14444 ssh-rsa hohdibsodbfoasbfbsabdfbsd... [77.34.122.33]:32209 ssh-rsa ...
0
votes
1answer
2k views

CentOS5 & OpenSSH not recognizing 'HashKnownHosts' and 'StrictHostKeyChecking' directives in sshd_config

I am running the latest build of OpenSSH (4.3p2) from CentOS 5. When I attempt to start the server with /etc/init.d/sshd start, this is the output from bash: Starting sshd: /etc/ssh/sshd_config: ...
0
votes
2answers
3k views

Passwordless ssh from Windows to Linux to run scripts from command prompt

What am trying here is ..... I Have some scripts that needs to run in Windows Command (command.exe) and not from Cygwin. The scripts needs to access a specific Linux machine from Windows command ...
22
votes
8answers
10k views

SSH into a box with a frequently changed IP

I have some cloud boxes that change their IP frequently. I ssh using the hostname but have to edit the known_hosts file every time the server launches because of this error message: @@@@@@@@@@@@@@@@@...
2
votes
4answers
2k views

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 ...
6
votes
4answers
13k views

How to make ssh match known_hosts to host/ip:port instead of just host/ip?

I have two machines behind a firewall, with the ssh ports forwarded to 2201 and 2202. When I ssh host -p 2201 it asks if I trust the machine, I say yes, it gets added to ~/.ssh/known_hosts Then ...
249
votes
16answers
333k views

Can I automatically add a new host to known_hosts?

Here's my situation: I'm setting up a test harness that will, from a central client, launch a number of virtual machine instances and then execute commands on them via ssh. The virtual machines will ...
2
votes
2answers
2k views

Wiped out the known_hosts file on my server machine. Is it safe?

I am fairly new to managing my production server and I had some problems accessing my EC2 account with the RSA HOst key for xxx has changed message. I read on a couple of Blogs that by simply deleting ...
0
votes
3answers
2k views

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 ...