Ask Your Question
0

Incompatible ssh peer (no acceptable kex algorithm)

asked 2017-07-15 14:17:31 -0600

chanhyeoni gravatar image

updated 2017-07-15 14:18:57 -0600

I want to launch ros nodes on remote machines using my host computer (the computer is connected to the machine via Ethernet hub). It seems that when the launch file I made makes a ssh connection, it automatically assigns the port number, and that causes the error. Although it says it has incomptabile ssh peer, it is more likely that I need to get rid of the port value than I need to find a proper key algorithm to authenticate ssh connection. So Is there a way not to assign the port number?

Below is the script file

#!/bin/bash

# retrieve the IP address of the inet addr and assign it to the environment variable $ROS_IP

function returnIPAddr(){
    local ip_addr_new=$( echo 'password' | sudo -S nmap -sP 192.168.1.0/24 | awk '/^Nmap/{ip=$NF}/'$1'/{print ip}')
    ip_addr_new=${ip_addr_new:1:${#ip_addr_new}-2}

    echo "$ip_addr_new"
}

ip_addr=""
#ip_addr_jetson=""
#ip_addr_raspberry_pi=""
echo "assigning IP address..."
ip_addr=$( ifconfig eth0 | grep "inet " | awk -F'[: ]+' '{ print $4 }' )
echo "ip address retrieved : $ip_addr"
export ROS_MASTER_URI="http://$ip_addr:11311/"
echo "successfully exported ROS_MASTER_URI to $ROS_MASTER_URI"

#run the raspberry pi file
ip_addr_jetson=$(returnIPAddr "00:04:4B")
ip_addr_raspberry_pi=$(returnIPAddr "B8:27:EB")

echo "the address of the jetson is $ip_addr_jetson"
echo "the address of the raspberry pi is $ip_addr_raspberry_pi"

# gnome-terminal -e "./raspberry_pi.sh $ip_addr"
# gnome-terminal -e "./jetson.sh $ip_addr"

export ROSLAUNCH_SSH_UNKNOWN=1

#ssh -oHostKeyAlgorithms='ssh-rsa' $ip_addr_jetson

# build the system
catkin_make
source devel/setup.bash
# roscore

# launch the commands using roslaunch\
roslaunch main.launch jetson_ip:=$ip_addr_jetson pi_ip:=$ip_addr_raspberry_pi host_ip:=$ip_addr

This is the launch file called from the script file

<launch>
    <arg name="jetson_ip" />
    <arg name="host_ip" />
    <arg name="pi_ip" />



    <machine name="host" address="$(arg host_ip)" env-loader="/opt/ros/indigo/env.sh" user="linuxmachine" password="password" default="true"/>
    <machine name="raspberry-pi" address="$(arg pi_ip)" env-loader="/opt/ros/indigo/env.sh" user="pi" password="password"/> 
<machine name="tegra-ubuntu" address="$(arg jetson_ip)" ssh-port="" env-loader="/home/catkin_ws/main.sh" user="ubuntu" password="password"/>

    <group ns="host">
        <node machine="host" pkg="joy" name="joy_node" type="joy_node" />
    </group>

    <group ns="tegra-ubuntu">
        <node machine="tegra-ubuntu" pkg="camera_driver_joystick"
name="camera_driver_joystick" type="camera_driver_joystick" />
    </group>

</launch>

The env-loader script for the machine (ubuntu) is as follows:

#!/bin/bash
export ROS_WS=/home/catkin_ws
catkin_make
source $ROS_WS/devel/setup.bash
export $PATH=$ROS_ROOT/bin:$PATH
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$ROS_WS
ip_addr=$( ifconfig eth0 | grep "inet " | awk -F '[: ]+' '{print $4}' )
export ROS_MASTER_URI="http://$ip_addr:11311/"
export ROS_HOSTNAME=$ip_addr
exec #@"

I got the following error when I typed the command ./main.sh

... logging to /home/linuxmachine/.ros/log/df93fbd6-698f-11e7-909d-507b9de5e4af/roslaunch-linuxmachine-5060.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://linuxmachine:36109/
remote[192.168.1.3-0] starting roslaunch
remote[192.168.1.3-0]: creating ssh connection to 192.168.1.3:22, user[ubuntu]
remote[192.168.1.3-0]: failed to launch on tegra-ubuntu:

Unable to establish ssh connection to [ubuntu@192.168.1.3:22]: Incompatible ssh peer (no acceptable kex algorithm)

[192.168.1 ...
(more)
edit retag flag offensive close merge delete

Comments

Port 22 is the default port for SSH servers. Are you running SSH on a different port on 192.168.1.3? What happens when you try to connect to it using SSH manually? i.e. ssh ubuntu@192.168.1.3

Ed Venator gravatar imageEd Venator ( 2017-07-15 15:01:47 -0600 )edit

Probably unrelated to your problem, but why are you running catkin_make in your env-loader script? The env-loader should set up environment variables and nothing else. Your software should already be built. Also, the last line should be exec "$@"

Ed Venator gravatar imageEd Venator ( 2017-07-15 15:28:26 -0600 )edit

the ssh command works fine, so no issue with that. And yes, I have to remove catkin_make and change it to exec "$@".

chanhyeoni gravatar imagechanhyeoni ( 2017-07-15 17:15:53 -0600 )edit

so then this has to do with the kex algorithm?

chanhyeoni gravatar imagechanhyeoni ( 2017-07-15 17:24:28 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-07-15 20:29:10 -0600

Ed Venator gravatar image

Try upgrading paramiko, as suggested in the answer to this question.

edit flag offensive delete link more

Comments

doesn't work

chanhyeoni gravatar imagechanhyeoni ( 2017-07-18 10:23:01 -0600 )edit

what's the compatible version of paramiko for ubuntu 14.10?

chanhyeoni gravatar imagechanhyeoni ( 2017-07-18 11:08:10 -0600 )edit

or is there a way to disable strict key comparison test?

chanhyeoni gravatar imagechanhyeoni ( 2017-07-18 11:10:53 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-07-15 14:17:31 -0600

Seen: 1,265 times

Last updated: Jul 15 '17