View Single Post
Posts: 36 | Thanked: 20 times | Joined on Nov 2009 @ Austin, TX
#6
Originally Posted by drangina View Post
Can you explain how can i log in through SSH as user not as root
Some basic steps and their reasons:
  • Add a password for the user account ("user"), it sounds like you may have already done this, you may want to have a different password than the root password, however.
    Code:
    //as root
    passwd user
    //enter a new password
  • Open and edit the sshd configuration file (exists at /etc/ssh/sshd_config)
    Here, we want to either disallow root logins:
    Code:
    ...
    PermitRootLogin yes
    ...
    //Change this to "no" to prevent root logins
    ... or specifically spell out which users are allowed to login
    Code:
    ...
    AllowUsers user
    //This line doesn't exist in the installed config file, so it'd need to be added
    ...
    Either of these (or both) should net what you want.
  • Once you've made the changes, restart the sshd daemon, eitehr by using the handy sshd status application or, again, as root
    Code:
    /etc/init.d/ssh restart

That should get you on your way.
 

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