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

roslaunch SSH known_host errors - cannot launch remote nodes

asked 2016-09-19 17:46:44 -0500

anonymous user

Anonymous

I am starting to use roslaunch across two systems (badmonkey and raspberrypi) running Indigo. I cannot seem to launch remote nodes and it appears to have something to do with SSH. I could use some help understanding how to isolate this issue. I currently have SSH public/private key authentication working in both directions (I can ssh user@system from either system with and without -p 22 to get to the other system with no password and it works great - I assume my respective user known_hosts file have been automatically updated per the ssh documentation). Is there something else I need to do with the system or user known_hosts file?

Here is the launch file:

<launch>
    <machine name="main-raspberry-pi" address="raspberrypi" default="true" user="pi"/>
    <machine name="badmonkey-machine" address="badmonkey" default="never" user="mike"/>

    <node pkg="inmoov" type="HandActionServer.py" name="inmoov_hand" machine="main-raspberry-pi" respawn="true" />
    <node pkg="inmoov" name="leap_motion_publisher" type="LeapPublisher.py" machine="badmonkey-machine" respawn="true" />
    <node pkg="inmoov" name="leap_motion_subscriber" type="LeapSubscriber.py" machine="main-raspberry-pi" respawn="true" />
</launch>

I use the this command:

roslaunch inmoov inmoov-rpi.launch --screen

When launching from the default system (raspberrypi) the remote node on badmonkey cannot be started:

... logging to /home/pi/.ros/log/abe119b2-7eb8-11e6-bc9a-b827eb200e86/roslaunch-raspberrypi-5384.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://raspberrypi:49070/
remote[badmonkey-0] starting roslaunch
remote[badmonkey-0]: creating ssh connection to badmonkey:22, user[mike]
remote[badmonkey-0]: failed to launch on badmonkey-machine:

Unable to establish ssh connection to [mike@badmonkey:22]: Server u'badmonkey' not found in known_hosts

[badmonkey-0] killing on exit
unable to start remote roslaunch child: badmonkey-0
The traceback for the exception was written to the log file

When launching from the non-default system (badmonkey) the remote node cannot be started:

... logging to /home/mike/.ros/log/525f5a1e-7eba-11e6-a2da-08002709c777/roslaunch-badmonkey-4440.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://badmonkey:40520/
remote[raspberrypi-0] starting roslaunch
remote[raspberrypi-0]: creating ssh connection to raspberrypi:22, user[pi]
remote[raspberrypi-0]: failed to launch on main-raspberry-pi:

raspberrypi is not in your SSH known_hosts file.

Please manually:
  ssh pi@raspberrypi

then try roslaunching again.

If you wish to configure roslaunch to automatically recognize unknown
hosts, please set the environment variable ROSLAUNCH_SSH_UNKNOWN=1

[raspberrypi-0] killing on exit
unable to start remote roslaunch child: raspberrypi-0
The traceback for the exception was written to the log file

When launching from the non-default system (badmonkey) with ROSLAUNCH_SSH_UNKNOWN=1 the remote node on raspberrypi cannot be started:

... logging to /home/mike/.ros/log/21bcad34-7eb6-11e6-9cb9-08002709c777/roslaunch-badmonkey-3649.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://badmonkey:43150/
remote[raspberrypi-0] starting roslaunch
remote[raspberrypi-0]: creating ssh connection to raspberrypi:22, user[pi]
remote[raspberrypi-0]: failed to launch on main-raspberry-pi:

Unable ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
12

answered 2016-09-19 19:06:59 -0500

Mark Rose gravatar image

ROS has a flaw (feature?) in that it uses a library to so SSH, rather than the usual SSH client. This library does not support the default key algorithm used by the typical SSH client. This means that even though you can SSH to the remote machine, ROS cannot, because the key algorithm isn't supported.

The fix is to remove the stored key in ~/.ssh/known_hosts, then SSH again to the remote machine, specifying the -oHostKeyAlgorithms='ssh-rsa' command-line option to force the use of the the RSA algorithm. Once this is done ROS can connect to the remote machine.

See http://answers.ros.org/question/41446... for details.

edit flag offensive delete link more

Comments

If it has not already been done, it would be nice to report this to the appropriate issue tracker, so this issue (which is becoming more and more a problem) is on the radar / tracked.

gvdhoorn gravatar image gvdhoorn  ( 2016-09-20 02:03:52 -0500 )edit

I agree that it would help it if were fixed. I'm not sure how to enter an issue, because I don't know which of the various ROS GitHub repositories it belongs in (or if it belongs with python-paramiko, the underlying library that has the limitation, I believe). Any suggestions?

Mark Rose gravatar image Mark Rose  ( 2016-09-20 11:04:23 -0500 )edit

I would say the roslaunchissue tracker makes the most sense, as that is where it is actually used. A quick search did not show me any already open issues about this. Suggestion: include links to revelant ROS Answers questions in your issue.

gvdhoorn gravatar image gvdhoorn  ( 2016-09-20 11:25:47 -0500 )edit

Has there been progress fixing this issue in later ROS versions?

zkytony gravatar image zkytony  ( 2022-01-11 18:15:32 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2016-09-19 17:46:44 -0500

Seen: 6,887 times

Last updated: Sep 19 '16