ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
11

A is not in your SSH known_hosts file.

asked 2012-08-15 01:45:13 -0500

liborw gravatar image

updated 2012-08-15 01:46:57 -0500

Hi,

I'm getting this error when trying to launch node on different computer.

A is not in your SSH known_hosts file

The problem is that the A is in SSH known_hosts. When I set ROSLAUNCH_SSH_UNKNOWN=1 everything works, but I do not want to connect to unknown machines.

edit retag flag offensive close merge delete

Comments

1

Same problem here. "ssh computer" works fine (doesn't need password because authorized dsa key added), so it's present in ~/.ssh/known_hosts (added on first connection) But when running a launch with defined machines, it doesn't work (says it's not in known_hosts file!). Did you find a solution?

fherrero gravatar image fherrero  ( 2012-08-29 01:06:39 -0500 )edit

4 Answers

Sort by ยป oldest newest most voted
30

answered 2012-08-29 23:48:15 -0500

fherrero gravatar image

We had the same/similar problem and we have finally solved it.

Roslaunch uses paramiko to create ssh connections, and it seems that paramiko still does not support the ecdsa algorithm, used now as default by last ssh, so it can't read from the known_hosts file generated with ecdsa and can't create the remote connections.

To solve it, we have deleted the known_hosts file (or the line in particular) and regenerated it (storing the new host when asked) doing the first ssh connection with the following command:

ssh -oHostKeyAlgorithms='ssh-rsa' host

So now, roslaunch/paramiko-ssh understands the known_hosts file and can connect to the remote machine.

edit flag offensive delete link more

Comments

Thanks for sharing. I had the same problem, too. Unfortunately this fix breaks gnomes sftp support in the file manager. I can't connect to my robot from file manager anymore, the console tools give me an option to type "yes" to ignore the offending key, file manager just refuses connection.

Kai Bublitz gravatar image Kai Bublitz  ( 2012-08-30 00:19:48 -0500 )edit

When I use the command line ssh -oHostKeyAlgorithms='ssh-rsa' host There is an error: ssh: Could not resolve hostname host: No address associated with hostname Do you have an ideas about it ? Thank you.

adadada gravatar image adadada  ( 2017-11-03 12:04:27 -0500 )edit

You need to replace host with the correct IPaddress or name (name associated to an IPaddress in your /etc/hosts file) of the computer you are connecting to.

fherrero gravatar image fherrero  ( 2017-11-06 02:46:01 -0500 )edit
2

answered 2020-05-18 19:12:43 -0500

The answers from @fherrero and @osencan can help to work around this issue. However, another option is upgrading paramiko to a version >=2.1.3. A PR was merged in February 2017 that fixes this issue. Ubuntu versions 19.10 and newer ship with versions meeting this criteria. If on 18.04 or older, the upgrade can be accomplished fairly easily with pip.

edit flag offensive delete link more

Comments

1

Thank you! logged in just to upvote. I think this should be the accepted answer in 2020.

samarth.robo gravatar image samarth.robo  ( 2020-10-15 21:04:00 -0500 )edit
1

answered 2012-08-15 05:07:02 -0500

Lorenz gravatar image

Are you sure that A is in your known_hosts file with the correct key? Try removing it from there and ssh into A manually and store the key. Then try the roslaunch again.

edit flag offensive delete link more

Comments

make sure to use exactly the same hostname when connecting as in the machine tag

tfoote gravatar image tfoote  ( 2012-08-15 11:32:31 -0500 )edit

I have done that, removed the key and log in manually (using command from the error message), added the key, but still getting the same error.

liborw gravatar image liborw  ( 2012-08-16 01:45:07 -0500 )edit
0

answered 2016-03-10 09:32:59 -0500

I think the solution is creating a dsa - public key authentication like explained in here

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2012-08-15 01:45:13 -0500

Seen: 11,759 times

Last updated: May 18 '20