Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: barbudor on April 02, 2011, 08:21:56 AM
-
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
-
You would put the user public key to ~/.ssh/authorized_keys, not as the host key (in openssh format, nothing special for dropbear).
-
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 :
---- BEGIN SSH2 PUBLIC KEY ----
Comment: "rsa-key-20110402"
A.....
......
......
.....=
---- END SSH2 PUBLIC KEY ----
So my authorized_keys file is now as above.
???
Thanks
barbudor
-
The ssh key as generated by openssh is on one line: "ssh-rsa DFGFDGDFGF......."
Perhaps you can choose openssh format in putty?
-
The only export function in PuttyGen seems to be for the private key only
-----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
-
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.
-
Was right in front of me ;D
Thanks Curaga,
You made my day !
have a nice week-end
br
barbudor