ssh passwordless from root

Hi all,
Anybody has succeeded in setting passwordless ssh FROM arduino yun root to another linux server root?
I'm trying to automate some scp and other commands from the fantastic Arduino YUN to a debian server.
So I'm trying to generate public key and copy it to the server on the purpose I installed

ssh-keygen ( but may be not enough)

I did the following:

ssh-keygen -t rsa

cat .ssh/id_rsa.pub | ssh root@mydebian_server 'cat >> .ssh/authorized_keys'

chmod 700 .ssh

chmod 600 .ssh/*

which usually works on every other machine

but I still get asked for the password

  1. I thought it could be that there is no ssh agent

2 ) or because there is no ssh-add

Anyway, I don't see the above utilities in the official repository

So I'm trying to follow
http://forum.arduino.cc/index.php?PHPSESSID=6qtsu5j40654eih2eo24jhnm96&topic=253943.0

and install sshpass

but I can't untar for some bug on tar wich i will work around in a while.

Anybody has succeeded in setting passwordless ssh ?

Thasnks a lot and good Arduinoing

http://forum.arduino.cc/index.php?topic=253943.msg1799995#msg1799995

Thank you very much sonnyyu for your link and for your precompiled binary of sshpass. I was having trouble compiling from the source code, apparently the configure.sh doesn't like the grep version...
Anyway later i'll see if I can solve the issue installing the proper ssh utilities so that i can login passwordless with public key. Thanks a lot.

dannatofrenk:
...
I was having trouble compiling from the source code, apparently the configure.sh doesn't like the grep version...
...

http://forum.arduino.cc/index.php?topic=266549.msg1881830#msg1881830

Good direction sonnyyu, you saved me a lot of work time again, I will apply the upgrade immediately and go on with the job.
It's incredible how quickly one can learn and get in to arduino from reading the forum

@dannatofrenk I'm actually wondering how you got ssh-keygen on your Yun as it isn't available on my build, which is the latest as far as I know (1.5.3). Not having ssh-keygen is really wreaking havoc on letting me get git up and running.

First, generate your identity key on 'Yun'

At Yun:

mkdir -p ~/.ssh/
dropbearkey -t rsa -f ~/.ssh/id_rsa

Since dropbear stores its keys in different format, it needs to be converted for a standard SSH server:

dropbearkey -y -f ~/.ssh/id_rsa | grep "^ssh-rsa" >> authorized_keys

At Linux box(192.168.0.225):

mkdir -p /home/sonnyyu/.ssh
chown sonnyyu:sonnyyu -R /home/sonnyyu/

At Yun:

scp authorized_keys sonnyyu@192.168.0.225:/home/sonnyyu/.ssh

At Linux box(192.168.0.225):

systemctl restart sshd.service #centos 7.0
/etc/init.d/sshd restart  #centos pre 7.0
/etc/init.d/ssh  restart  #debian/ubuntu

At Yun:

ssh sonnyyu@192.168.0.225 -i ~/.ssh/id_rsa

@Bombaire,

sorry for not answering you, before.

provided tha tusing dropbear ans sonnyyu sugests is the baest solution,
I installed the package typing

#opkg update
#opkg list | grep -i ssh
#opkg install ssh-keygen

I'm not sure about the package name ssh-keygen because at the moment I can't operate on the arduino yun to check.
regards