Active Topics

 


Reply
Thread Tools
Posts: 24 | Thanked: 6 times | Joined on Jun 2007
#1
I have been successful in installing xterm, openssh and then "ssh-ing" over to the 770 from my laptop using putty... but only as root. How can I use ssh to connect to my 770 as the default user. Is the default username "user". I see that as the only entry in /home.

Thanks,
Ed
 
Posts: 93 | Thanked: 4 times | Joined on Jul 2007 @ Anywhere but here
#2
I think the default username is user, I think you can create additional users in the control panel. I'm not sure how to change to being that user, but, why do you want to?
 
Posts: 24 | Thanked: 6 times | Joined on Jun 2007
#3
I think I want to for permissions reasons... For example, if during one of my ssh sessions, I create a text file as root, will the default user be able to access the file, delete it, etc.

Ed


Originally Posted by FirebirdFeuervogel View Post
I think the default username is user, I think you can create additional users in the control panel. I'm not sure how to change to being that user, but, why do you want to?
 
Posts: 3,401 | Thanked: 1,255 times | Joined on Nov 2005 @ London, UK
#4
Originally Posted by CelticDaddio View Post
I have been successful in installing xterm, openssh and then "ssh-ing" over to the 770 from my laptop using putty... but only as root. How can I use ssh to connect to my 770 as the default user. Is the default username "user". I see that as the only entry in /home.

Thanks,
Ed
Here's how...

Note: These instructions apply to both the 770 and N800 when using openssh
  1. Generate a public/private key on your PC using puttygen.exe (available for download from the place you got PuTTY). Select "SSH-2 DSA" then click on the "Generate" button and waggle your mouse to generate entropy...

    [direct link to x86 puttygen.exe => here]

  2. Next, save the generated public and private keys in your PuTTY program file directory (public.ppk and private.ppk respectively) - leave the passphrase blank unless you want to enter a passphrase each time you connect to your 770.

  3. On your 770, create a directory called "/home/user/.ssh" and make sure the permissions on this directory are 700 and that it is owned by user "user".

  4. In puttygen, copy the generated public key text which appears at the top of the window to the PC clipboard, then paste the text into a file called "/home/user/.ssh/authorized_keys" on your 770. Paste the key as one long line of text, no line breaks. Make sure the permissions on the authorized_keys file are 644 and that it is owned by user "user".

    The public key text will start with "ssh-dss" followed by gibberish and end with "dsa-key-yyyymmdd" where yyyymmdd is the current date - copy the whole text, start to finish!

  5. Finally, configure your PuTTY ssh session to use the private key you just generated and saved.

    Load your existing PuTTY session or create a new session, then make the following changes in the specified PuTTY categories:

    • Connection -> Data

      Enter "user" as the auto-login username (without quotes)

    • Connection -> SSH

      Select SSH2 as the preferred SSH protocol version.
      Encryption ciphers should be (top to bottom): AES, Blowfish, 3DES, DES.

    • Connection -> SSH -> Auth

      Enter the full path for your private key file

    • Session

      Set "Host name" to be the hostname or ip address of your 770
      Select Protocol as SSH
      Port should be 22
      Enter a suitable name in "Saved Sessions" (eg. "Nokia 770")
      Click "Save"

  6. You're done - no need to restart sshd or the device. Select your new session and click "Open" to login to your 770.

Now, whenever you open your new saved PuTTY session you will log in automatically (or be prompted for a passphrase if set) as user "user".

You can create a PuTTY desktop shortcut to load your new PuTTY session by appending -load "Nokia 770" to the end of the command line.

NOTE: Should you ever lose your authorized_keys file (eg. not backed up prior to a reflash) you can always recover the public key text by loading your private key file (private.ppk) into puttygen.

Last edited by Milhouse; 2007-09-06 at 18:34.
 

The Following 2 Users Say Thank You to Milhouse For This Useful Post:
Posts: 168 | Thanked: 51 times | Joined on Jun 2007
#5
You can also ssh shell in as root and type:
passwd user
and give the user account a password.

Now just ssh in as user@ipaddress and type in your password.

edit: This works on the n800, don't know for sure about n770
 

The Following User Says Thank You to coffeedrinker For This Useful Post:
Posts: 3,401 | Thanked: 1,255 times | Joined on Nov 2005 @ London, UK
#6
Originally Posted by coffeedrinker View Post
You can also ssh shell in as root and type:
passwd user
and give the user account a password.

Now just ssh in as user@ipaddress and type in your password.

edit: This works on the n800, don't know for sure about n770
Adding a password to the user account creates another vector for exploitation... basically, you are weakening the existing security by adding a password to an account that currently cannot be logged into.

Use the public/private key method outlined above and you can also disable logins on root eliminating all possibilty of someone gaining access to your device by brute force.

Unlikely to happen I know, but some people are paranoid and sometimes with good reason, however I would certainly argue against adding a password to "user" under any circumstances.

Last edited by Milhouse; 2007-08-10 at 19:10.
 

The Following User Says Thank You to Milhouse For This Useful Post:
free's Avatar
Posts: 739 | Thanked: 159 times | Joined on Sep 2007 @ Germany - Munich
#7
# On your 770, create a directory called "/home/user/.ssh" and make sure the permissions on this directory are 755 and that it is owned by user "user".

# In puttygen, copy the generated public key text which appears at the top of the window to the PC clipboard, then paste the text into a file called "/home/user/.ssh/authorized_keys" on your 770. Paste the key as one long line of text, no line breaks. Make sure the permissions on the authorized_keys file are 644 and that it is owned by user "user".
Why perm 755 and 644, why not 700 and 600 ?
 
Posts: 3,401 | Thanked: 1,255 times | Joined on Nov 2005 @ London, UK
#8
Well spotted - it should be 700. It can't be 600 as it's a directory. I'll update the text now... thanks.
 
Posts: 94 | Thanked: 6 times | Joined on Sep 2005 @ Bangkok, Thailand
#9
Originally Posted by Milhouse View Post
Here's how...

Note: These instructions apply to both the 770 and N800 when using openssh
  1. Generate a public/private key on your PC using puttygen.exe (available for download from the place you got PuTTY). Select "SSH-2 DSA" then click on the "Generate" button and waggle your mouse to generate entropy...

    [direct link to x86 puttygen.exe => here]

  2. Next, save the generated public and private keys in your PuTTY program file directory (public.ppk and private.ppk respectively) - leave the passphrase blank unless you want to enter a passphrase each time you connect to your 770.

  3. On your 770, create a directory called "/home/user/.ssh" and make sure the permissions on this directory are 700 and that it is owned by user "user".

  4. In puttygen, copy the generated public key text which appears at the top of the window to the PC clipboard, then paste the text into a file called "/home/user/.ssh/authorized_keys" on your 770. Paste the key as one long line of text, no line breaks. Make sure the permissions on the authorized_keys file are 644 and that it is owned by user "user".

    The public key text will start with "ssh-dss" followed by gibberish and end with "dsa-key-yyyymmdd" where yyyymmdd is the current date - copy the whole text, start to finish!

  5. Finally, configure your PuTTY ssh session to use the private key you just generated and saved.

    Load your existing PuTTY session or create a new session, then make the following changes in the specified PuTTY categories:

    • Connection -> Data

      Enter "user" as the auto-login username (without quotes)

    • Connection -> SSH

      Select SSH2 as the preferred SSH protocol version.
      Encryption ciphers should be (top to bottom): AES, Blowfish, 3DES, DES.

    • Connection -> SSH -> Auth

      Enter the full path for your private key file

    • Session

      Set "Host name" to be the hostname or ip address of your 770
      Select Protocol as SSH
      Port should be 22
      Enter a suitable name in "Saved Sessions" (eg. "Nokia 770")
      Click "Save"

  6. You're done - no need to restart sshd or the device. Select your new session and click "Open" to login to your 770.

Now, whenever you open your new saved PuTTY session you will log in automatically (or be prompted for a passphrase if set) as user "user".

You can create a PuTTY desktop shortcut to load your new PuTTY session by appending -load "Nokia 770" to the end of the command line.

NOTE: Should you ever lose your authorized_keys file (eg. not backed up prior to a reflash) you can always recover the public key text by loading your private key file (private.ppk) into puttygen.
The instructions given for PuTTY are for a MS system. I'm using Linux where PuTTY commands are different. Any chance of putting me on the right track.

thaibill
 
Johnx's Avatar
Posts: 643 | Thanked: 628 times | Joined on Mar 2007 @ Seattle (or thereabouts)
#10
@thaibill:
on your linux desktop, as your user (not as root!):
Code:
ssh-keygen
Answer the prompts. I don't bother using a password. It's up to you, though. Now, copy the key over USB to your internal sd card in your tablet:
Code:
cp ~/.ssh/id_rsa.pub /media/disk/
Now, on the n8x0/770, as user, type this in xterm:
Code:
cd /home/user
mkidir .ssh
chmod 700 .ssh
cat /media/mmc2/id_rsa.pub >> ~/.ssh/authorized_keys
-John
 

The Following 2 Users Say Thank You to Johnx For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 16:54.