![]() |
dropbear and Bluetooth
Hi, I'd like someone to explain me or point me on some written guide on how to do 2 things, or even one of them would be fine ;)
1) I have dropbear working nice, but I start the connection entering as user, and then input the password I've setted on my 770 with passwd user. I'm using Putty on Windows, so I've generated the keys pair with PuttyGen and I've setted the private one in my Putty -> Connection -> SSH -> Auth. I've copied the public one as authorized_keys under home/user/.ssh/ and I've changed the permissions of the folder and the file. But, when connecting with Putty it says "Server refused our key" and I have to log in using the password. Can someone write how to use those keys as they are supposed to? Is it good to copy the public one into the file authorized_keys under home/user/.ssh ? 3) I have a bluetooth dongle on my PC and it is seen on the 770 (tested with hcitool scan). Could I use dropbear to establish a SSH connection through bluetooth rather than wi-fi? How? |
1) Try renaming your authorized_keys file to authorized_keys2
Permissions should be 600 3) I don't know but wifi is better. |
3) Not Possible.
|
Quote:
I'm not totally on the dir where to put the authorized_keys (or authorized_keys2) file: is it good "/home/user/.ssh/" ? Or it should be something under root? Btw, is it too much bad to use the ssh connection with just the user password, I mean without this keypair thing? It works, but how much secure is it with a not so long alphanumeric user password? If it's enough, I can avoid the key check. Both of you repliers have noticed that I've written "3" for the second question :) Well, let's put here a number 2: 2) How can I use PSCP (or PSFTP?) to transfer files back and forth between 770 and PC? Should I install something on the 770, or the dropbear server/client package on komputika repository is enough? I've tried from a cmd prompt in Windows XP the following command (the x's stand for something else): Code:
C:\putty> pscp -pw xxxxxxxxxxxxxx c:\test_file.txt user@192.168.x.x:/home/user/test_file.txtCode:
sh: /usr/lib/sftp-server: not found |
You are better of with WinSCP is much simpler and the default settings in dropbear should work.
|
The authouized_keys2 file should be in /home/user/.ssh
my .ssh directory is mode 755 owner=user; group=users All the files in the .ssh folder are mode 600 and owner=user; group=users Code:
~/.ssh $ ls -laThe known_hosts file should be created the first time you try to connect to the 770. I connect to the 770 using: ssh user@192.168.1.103 I've set up my router to assign that IP to the 770 based on it's MAC address so it's always the same. scp is similar to yours but I don't give the destination filename, just the directory: scp filename user@192.168.1.103:/media/mmc1 or whatever. |
1) shoud be something trivial (putty keys misconfiguration?)
Code:
~ $ ls -la .ssh/my bnep-up script Code:
#!/bin/sh |
No way, I don't know what I'm doing wrong. This is what I see on n770:
Code:
~ $ ls -la .ssh/I have re-generated the keys with puttygen just to make sure they're good, here they are: This is the private key that I give to Putty: Code:
PuTTY-User-Key-File-2: ssh-rsaCode:
---- BEGIN SSH2 PUBLIC KEY ---- |
Did you provide a password when you generated your keys? ( I don't )
If so you'll need to enter that password each time you connect with ssh unless you run the putty agent which will handle that password for you. |
Quote:
|
I've just tried loading the agent (pageant), I've added the private key to its list of keys (it asked for the pass phrase too the first time), then now connecting to the n770 it no longer says that the server refuses our keys, just asks for username (user) and password and goes on. Shoult it be how I've described it? If yes, thanks to all and Bandit
|
It shouldn't ask for your username and password if you have the 770's .ssh directory setup right.
You may need to delete the entry in your known_hosts file after you change keys. |
Quote:
|
Check your public key in your authorized_keys file and make sure the key is one line.
It's a long key and will wrap but it must be one line. |
Quote:
|
Quote:
Code:
ssh-rsa ......reallylots(372?)ofrandomletters........ user@machine |
Thanks, that was the problem! I was using the key which Puttygen saves by chosing to save into a file, rather than the one it displayed in the textarea field.
|
| All times are GMT. The time now is 16:08. |
vBulletin® Version 3.8.8