WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [SOLVED] Setting up SSH server (dropbear) in TC (3.5.1) using PuttyGen  (Read 12179 times)

Offline barbudor

  • Newbie
  • *
  • Posts: 17
Hello

I am trying to setup dropbear as a SSH server in TC 3.5.1 and using it with PuTTY on my Windows PC.

Package is installed and running. My problem is all about keys..

Here is what I did :
- insured that /etc/dropbear is cleared
- start dropbear : /etc/init.d/dropear start
  This creates default keys in /etc/dropbear/

Back on Windows :
- run PuttyGen
- create a new key (SSH-2 RSA, 1024 bits)
- Save private key as myprivate.ppk
- Export private key as myprivate.openssh
- Copy myprivate.openssh to Tinycore

Back to Tinycore :
- convert myprivate.openssh to dropbear using
    dropbearconvert openssh dropbear myprivate.openssh /etc/dropbear/dropbear_rsa_host_key
  (thus replacing the existing one in /etc/dropbear/)
- restart dropbear
  /etc/init.d/dropbear restart

Trying now to connect with Putty using myprivate.ppk I have no succes :
- Putty opens a dialog saying "No authentification methods available"
- In the Putty window I get "Server refused our key"

I must admit I am very new to this so I probably made a mistake between private or public keys or something like this.

Any help will be appreciated.

Thanks

barbudor
----------------

SOLUTION:
In PuttyGen window, there is a section name "Public key for pasting to OpenSSH..."
Copy this text and paste it into a file name authorized_keys and place this key into /home/tc/.ssh

Thanks to Curaga for his help/

barbudor
« Last Edit: April 02, 2011, 03:13:45 PM by barbudor »
tinycore 3.8.3 on HP Thin Client T5300 (Transmeta Crusoe@533MHz, 56MB RAM, 2GB Compact Flash)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Setting up SSH server (dropbear) in TC(3.5.1)
« Reply #1 on: April 02, 2011, 08:43:40 AM »
You would put the user public key to ~/.ssh/authorized_keys, not as the host key (in openssh format, nothing special for dropbear).
The only barriers that can stop you are the ones you create yourself.

Offline barbudor

  • Newbie
  • *
  • Posts: 17
Re: Setting up SSH server (dropbear) in TC(3.5.1)
« Reply #2 on: April 02, 2011, 09:52:55 AM »
Hi curaga

I copied my public key both in /root/.ssh and /home/tc/.ssh as authorized_keys and restarted dropbear without any success.

could it be a format problem ?

My public key comes from PuttyGen and is in the form :

Code: [Select]
---- BEGIN SSH2 PUBLIC KEY ----
Comment: "rsa-key-20110402"
A.....
......
......
.....=
---- END SSH2 PUBLIC KEY ----

So my authorized_keys file is now as above.


 ???

Thanks

barbudor
tinycore 3.8.3 on HP Thin Client T5300 (Transmeta Crusoe@533MHz, 56MB RAM, 2GB Compact Flash)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Setting up SSH server (dropbear) in TC(3.5.1)
« Reply #3 on: April 02, 2011, 10:13:28 AM »
The ssh key as generated by openssh is on one line: "ssh-rsa DFGFDGDFGF......."

Perhaps you can choose openssh format in putty?
The only barriers that can stop you are the ones you create yourself.

Offline barbudor

  • Newbie
  • *
  • Posts: 17
Re: Setting up SSH server (dropbear) in TC(3.5.1)
« Reply #4 on: April 02, 2011, 10:26:22 AM »
The only export function in PuttyGen seems to be for the private key only

Code: [Select]
-----BEGIN RSA PRIVATE KEY-----
M...
.....
....L
-----END RSA PRIVATE KEY-----

Sounds like I need to generate my keys using OpenSSH tools....

Thanks.
I will will update my progress here.

Regadrs

barbudor
tinycore 3.8.3 on HP Thin Client T5300 (Transmeta Crusoe@533MHz, 56MB RAM, 2GB Compact Flash)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Setting up SSH server (dropbear) in TC(3.5.1)
« Reply #5 on: April 02, 2011, 10:32:54 AM »
I googled puttygen, it has a window "Public key for pasting to openssh authorized_keys". Copy your key from here and it's in the right format.
The only barriers that can stop you are the ones you create yourself.

Offline barbudor

  • Newbie
  • *
  • Posts: 17
Re: Setting up SSH server (dropbear) in TC(3.5.1)
« Reply #6 on: April 02, 2011, 03:08:26 PM »
Was right in front of me  ;D

Thanks Curaga,
You made my day !

have a nice week-end

br

barbudor
tinycore 3.8.3 on HP Thin Client T5300 (Transmeta Crusoe@533MHz, 56MB RAM, 2GB Compact Flash)