Reply
Thread Tools
dgenge's Avatar
Posts: 51 | Thanked: 3 times | Joined on Sep 2007 @ Halifax, NS
#1
Got SSH installed OK, one post said input..
"SSH -1 root@localhost" to gain root access, but I tried and got this.
"Protocol major versions differ: 1 vs. 2"
I installed the proper version of SSH (At least I think) from Maemo downloads for OS2008!
Please what amd I doing wrong....

N800 and OS2008.... Darren Thanks in advance
__________________
GengeMan....
from Halifax, N.S. Canada
 
free's Avatar
Posts: 739 | Thanked: 159 times | Joined on Sep 2007 @ Germany - Munich
#2
Why the "-1" ?
ssh root@localhost

You can also use becomeroot to gain root access.
 
Posts: 20 | Thanked: 1 time | Joined on Jan 2008 @ Toronto, Ontario
#3
My 1st post using my n800.


What ssh client are yiu using to ssh into the device? Make sure you set the client to use ssh2 only.
__________________
cheers,
darkog
 
free's Avatar
Posts: 739 | Thanked: 159 times | Joined on Sep 2007 @ Germany - Munich
#4
Make sure you set the client to use ssh2 only.
You probably mean the server.

Line
Protocol 2
In /etc/ssh/sshd_config.

If this line doesn't exist, v2 will be used and if the client does not understand v1, it will switch to the _insecure_ v1.
 
dgenge's Avatar
Posts: 51 | Thanked: 3 times | Joined on Sep 2007 @ Halifax, NS
#5
Originally Posted by free View Post
Why the "-1" ?
ssh root@localhost

You can also use becomeroot to gain root access.
Thanks Free your the man! Its was having the "-1" in the command line that was the problem. I put "-1" there because someone posted the string and said this is what you should type!

Thanks again everyone for quick replies....
__________________
GengeMan....
from Halifax, N.S. Canada
 
free's Avatar
Posts: 739 | Thanked: 159 times | Joined on Sep 2007 @ Germany - Munich
#6
This is exactly what you *shouldn't* type. (in your case it's localhost fine but I thought it's worth mentionning)

There are a lot of tools to relay, record traffic, capture password, and manipulate interact sessions for ssh v1. If you add on top of this that you ssh to root then it's heaven for crackers.

These tools have even been ported to nokia devices..
 
dgenge's Avatar
Posts: 51 | Thanked: 3 times | Joined on Sep 2007 @ Halifax, NS
#7
Thanks Man! Saved a noob again...:-)
__________________
GengeMan....
from Halifax, N.S. Canada
 

The Following User Says Thank You to dgenge For This Useful Post:
Posts: 3,401 | Thanked: 1,255 times | Joined on Nov 2005 @ London, UK
#8
Originally Posted by dgenge View Post
Got SSH installed OK, one post said input..
"SSH -1 root@localhost" to gain root access
You've mistyped the command, you are entering -1 instead of minus lowercase L (ie. -l) - they look the same but mean very different things to ssh, as -1 forces it to use an older protocol (v1).

There are actually two variants of the command that you should be using and they achieve the same thing:

Code:
ssh -l <user> <host>
or as Free points out
Code:
ssh <user>@<host>
Also see here for my handy dandy instructions on how you can ssh in as the user account without using a password, then use sudo gainroot (after installing the becomeroot package) to gain root priveleges.
 
Posts: 11 | Thanked: 1 time | Joined on Jan 2008
#9
Will I create new problems if I add a password to the user account?
I would rather be able to get into my 810 from anywhere, w/out doing the certificate management dance first.
 
free's Avatar
Posts: 739 | Thanked: 159 times | Joined on Sep 2007 @ Germany - Munich
#10
No it won't create a problem to put a password for user.

And if you don't like the dance, there is a usefull linux script ssh-copy-id

PHP Code:
ID_FILE="${HOME}/.ssh/id_rsa.pub"

if [ "-i" "$1" ]; then
  shift
  
# check if we have 2 parameters left, if so the first is the new ID file
  
if [ -"$2" ]; then
    
if expr "$1" ".*\.pub" >/dev/nullthen
      ID_FILE
="$1"
    
else
      
ID_FILE="$1.pub"
    
fi
    shift         
# and this should leave $1 as the target name
  
fi
else
  if [ 
x$SSH_AUTH_SOCK != ] && ssh-add ->/dev/null 2>&1then
    GET_ID
="$GET_ID ssh-add -L"
  
fi
fi

if [ -"`eval $GET_ID`" ] && [ -"${ID_FILE}] ; then
  GET_ID
="cat ${ID_FILE}"
fi

if [ -"`eval $GET_ID`" ]; then
  
echo "$0: ERROR: No identities found" >&2
  
exit 1
fi

if [ "$#" -lt 1 ] || [ "$1" "-h" ] || [ "$1" "--help" ]; then
  
echo "Usage: $0 [-i [identity_file]] [user@]machine" >&2
  
exit 1
fi

{ eval "$GET_ID; } | ssh $"umask 077; test -d .ssh || mkdir .ssh ; cat >> .ssh/authorized_keys" || exit 
From a linux (or cygwin in windows) to the device:
ssh user@n800
enter the password

And that's it, it won't ever ask you for a password anymore.

For this you will need an ssh-agent (started by common session manager like kdm, gdm)
And enter once the passphrase for your keyring using ssh-add.
On the client, to create your keyring in .ssh/ (only needed once)
ssh-keygen

Last edited by free; 2008-01-30 at 19:39.
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 13:19.