Koozali.org: home of the SME Server

Howto Login via ssh without root?

artful

Howto Login via ssh without root?
« on: June 24, 2005, 05:16:56 PM »
Can anyone explain to me what I need to change in order to prevent being able to login via ssh  as 'root'?

thanks

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Howto Login via ssh without root?
« Reply #1 on: June 24, 2005, 05:58:19 PM »
Quote from: "artful"
Can anyone explain to me what I need to change in order to prevent being able to login via ssh  as 'root'?


By default, you *can't* log in via ssh as root. The only way you can enable root login via ssh is from the command line.

If you've done that (which I doubt), you need to undo it:

/sbin/e-smith/config setprop sshd PermitRootLogin no
/sbin/e-smith/signal-event remoteaccess-update

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Howto Login via ssh without root?
« Reply #2 on: June 24, 2005, 06:36:00 PM »
Charlie

> By default, you *can't* log in via ssh as root.

What version of sme are you referring to Charlie, on 6.0 you can log in as root OK by default ?

Thanks
Ray
...

artful

Howto Login via ssh without root?
« Reply #3 on: June 25, 2005, 11:03:02 PM »
sorry guys but  you are wrong!

I first installed 6.0 and always made ssh connections with root login and occassionally admin in order to get the setup menu.

I later did a clean install of version 6.5 and i'm still using root as login.

I know this is potentionaly unsafe so that is why I posed the question of changing it.

I get quite a few hack attacks so I would like to change it!

artful

Howto Login via ssh without root?
« Reply #4 on: June 25, 2005, 11:03:25 PM »
sorry guys but I guess you are wrong!

I first installed 6.0 and always made ssh connections with root login and occassionally admin in order to get the setup menu.

I later did a clean install of version 6.5 and i'm still using root as login.

I know this is potentionaly unsafe so that is why I posed the question of changing it.

I get quite a few hack attacks so I would like to change it!

Offline raem

  • *
  • 3,972
  • +4/-0
Howto Login via ssh without root?
« Reply #5 on: June 26, 2005, 05:01:00 AM »
artful

Apart from the question of whether ssh root access is available by default or not (perhaps he is referring to another version), Charlie has answered how to disable it.

/sbin/e-smith/config setprop sshd PermitRootLogin no
/sbin/e-smith/signal-event remoteaccess-update

Thanks Charlie
...

Offline gordonr

  • *
  • 646
  • +0/-0
    • http://www.smeserver.com.au/
Re: Howto Login via ssh without root?
« Reply #6 on: June 26, 2005, 02:57:27 PM »
Quote from: "CharlieBrady"

By default, you *can't* log in via ssh as root. The only way you can enable root login via ssh is from the command line.


By default:
- SSH is disabled
- SSH root logins are disabled
- SSH via password authentication is disabled

There are toggles for all of these on the Remote Access panel.

Gordon
............