Koozali.org: home of the SME Server

remote access with key pairs

Offline croppa

  • **
  • 24
  • +0/-0
remote access with key pairs
« 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

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: remote access with key pairs
« Reply #1 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?
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline croppa

  • **
  • 24
  • +0/-0
Re: remote access with key pairs
« Reply #2 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

Offline crazybob

  • *****
  • 894
  • +0/-0
    • Stalzer R&D
remote access with key pairs
« Reply #3 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.
If you think you know whats going on, you obviously have no idea whats going on!

Offline croppa

  • **
  • 24
  • +0/-0
remote access with key pairs
« Reply #4 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

Offline crazybob

  • *****
  • 894
  • +0/-0
    • Stalzer R&D
remote access with key pairs
« Reply #5 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
If you think you know whats going on, you obviously have no idea whats going on!

Offline croppa

  • **
  • 24
  • +0/-0
remote access with key pairs
« Reply #6 on: September 13, 2006, 11:46:28 AM »
Thanks all working perfectly now
Stuart

Offline brianr

  • *
  • 990
  • +2/-0
remote access with key pairs
« Reply #7 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?
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........