Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: croppa on September 11, 2006, 11:44:35 AM

Title: remote access with key pairs
Post by: croppa on September 11, 2006, 11:44:35 AM
I have been used to using remote access using key pairs to backup my work data each night to home with sme server 6.0.1 however on changeing to sme 7 the same procedure to set up seams not work.
I have $ssh-keygen -t rsa
          $scp /root/.ssh/id_rsa.pub root@remote.machine:~/.ssh
          $ssh root@remote.machine
          $cd .ssh
          $cat id_rsa.pub >>authorized_keys2
          $chmod go-w authorized_keys2
Then turn off access with passwords
This works with 6.0.1 But does not seam to with sme7
Is anyone able to help please.
also how do you allow a user (other than root)ssh in? Changing the passwd file does not seam to work like sme6.0.1
Thanks again
Stuart
Title: Re: remote access with key pairs
Post by: cactus on September 11, 2006, 12:55:47 PM
Quote from: "croppa"
I have been used to using remote access using key pairs to backup my work data each night to home with sme server 6.0.1 however on changeing to sme 7 the same procedure to set up seams not work.
I have $ssh-keygen -t rsa
          $scp /root/.ssh/id_rsa.pub root@remote.machine:~/.ssh
          $ssh root@remote.machine
          $cd .ssh
          $cat id_rsa.pub >>authorized_keys2
          $chmod go-w authorized_keys2
Then turn off access with passwords
This works with 6.0.1 But does not seam to with sme7
Is anyone able to help please.
also how do you allow a user (other than root)ssh in? Changing the passwd file does not seam to work like sme6.0.1
Thanks again
Stuart
Have you tried wellsi's howto (http://no.longer.valid/phpwiki/index.php/SSH%20Public-Private%20Keys)?
Title: Re: remote access with key pairs
Post by: croppa on September 11, 2006, 01:20:45 PM
Thanks cactus
I have used that method with SME 6.0.1 however I have had no luck with SME 7.
it comes back with *Permission denied (publickey).* When passwords are turned off or asks for a password if they are turned on.
Stuart
Title: remote access with key pairs
Post by: crazybob on September 11, 2006, 01:51:17 PM
I ran into the same problem. I fixed it by changing the shell to bash for the user I was trying to log in as.
Title: remote access with key pairs
Post by: croppa on September 11, 2006, 02:04:47 PM
Thanks crazybob. That worked in SME 6.0.1 to allow a user to ssh in but seams not to work in SME 7
Thanks
Stuart
Title: remote access with key pairs
Post by: crazybob on September 11, 2006, 03:54:15 PM
I used that on SME 7.0, but I could not login as root. I had to login as another user and su to get root control.

Bob
Title: remote access with key pairs
Post by: croppa on September 13, 2006, 11:46:28 AM
Thanks all working perfectly now
Stuart
Title: remote access with key pairs
Post by: brianr on September 13, 2006, 01:58:08 PM
Quote from: "croppa"
Thanks all working perfectly now
Stuart


did you make any changes?  Can we know what they where, so that we can avoid the problems?