Dropbear key problem

Guillaume Dargaud dargaud at lpsc.in2p3.fr
Mon May 5 23:10:57 WST 2008


Hello John,
well, I followed closely your instructions and it worked this time.

I have no idea why it failed the first time I tried it since I had basically 
the same steps (just a different path to the private key), which worked when 
I tried again...

It breaks down to:
user at host $ ssh -x root at target "dropbearkey -y -t dss -f 
/etc/dropbear/dropbear_dss_host_key | tail -2 | head -1" 
 >>~/.ssh/authorized_keys

and then:
root at target # ssh -i /etc/dropbear/dropbear_dss_host_key  user at host

Thanks.
-- 
Guillaume Dargaud
http://www.gdargaud.net/


----- Original Message ----- 
From: John Smith
To: Guillaume Dargaud ; dropbear at ucc.asn.au
Sent: Monday, May 05, 2008 15:51
Subject: RE: Dropbear key problem


...
> I have previously put the public key I got from
> dropbearkey -y -t dss -f /etc/dropbear/dropbear_dss_host_key
> into user at host:.ssh/authorized_keys
>
> In my local ~/.ssh I have only the files authorized_keys and known_hosts.
> The private keys are in /etc/dropbear/dropbear_*_host_key
>
> Does that matter ? I tried with both rsa and dss key...
> -- 
You need to generate a user private and public key. See: 
http://pkeck.myweb.uga.edu/ssh/ for a general overview.

root at CHM-0742-00187:~/.ssh$ dropbearkey -t rsa -f id_rsa
Will output 1024 bit rsa secret key to 'id_rsa'
Generating key, this may take a while...
Public key portion is:
ssh-rsa 
AAAAB3NzaC1yc2EAAAADAQABAAAAgwCxVe533yHtWgb11j+L6zHIRllDIp3xR3nEB3Jxjw9ZUXHXZGgXk/A06sd3AF4sUbo3YvRIuj5EzDfjy1SAUrpD3b4WU9bayoTie3LJ6FU5TSEySOWvrkW/4/iuFUAvry0G1ISlMEMqpLvoSx6JcE/UL4JoKIUzM2jnordtyR9gn53r 
root at CHM-0742-00187
Fingerprint: md5 5a:d7:ef:84:aa:40:11:4e:d5:3d:17:0d:b2:30:b0:8b


root at CHM-0742-00187:~/.ssh$ dropbearkey -y -f id_rsa
Public key portion is:
ssh-rsa 
AAAAB3NzaC1yc2EAAAADAQABAAAAgwCxVe533yHtWgb11j+L6zHIRllDIp3xR3nEB3Jxjw9ZUXHXZGgXk/A06sd3AF4sUbo3YvRIuj5EzDfjy1SAUrpD3b4WU9bayoTie3LJ6FU5TSEySOWvrkW/4/iuFUAvry0G1ISlMEMqpLvoSx6JcE/UL4JoKIUzM2jnordtyR9gn53r 
root at CHM-0742-00187
Fingerprint: md5 5a:d7:ef:84:aa:40:11:4e:d5:3d:17:0d:b2:30:b0:8b
root at CHM-0742-00187:~/.ssh$ dropbearkey -y -f id_rsa > id_rsa.pub

Then edit id_rsa.pub so that there is a single line (note it is broken up 
here):

ssh-rsa 
AAAAB3NzaC1yc2EAAAADAQABAAAAgwCxVe533yHtWgb11j+L6zHIRllDIp3xR3nEB3Jxjw9ZUXHXZGgXk/A06sd3AF4sUbo3YvRIuj5EzDfjy1SAUrpD3b4WU9bayoTie3LJ6FU5TSEySOWvrkW/4/iuFUAvry0G1ISlMEMqpLvoSx6JcE/UL4JoKIUzM2jnordtyR9gn53r 
root at CHM-0742-00187

Then append that key id_rsa.pub on the remote machine to 
/home/user/.ssh/authorized_keys

cat id_rsa.pub >> /home/user/.ssh/authorized_keys

-snafu



With Windows Live for mobile, your contacts travel with you. Connect on the 
go. 





More information about the Dropbear mailing list