How to install sshd and config for authentication with private key only
Once the system is up and running, the first thing for most linux system admin to do is to install sshd and configure authentication. Nowadays, most IT companies will not allow password based authentication anymore. Most coporate environment favours ssh key based authentication. Of course, there are hundreds of different methods to do this. Here is one of my favourite and simplest guide.
I’ve assumed you use Debian based linux and logon under root. If you are using other linux, change the command to yum or whatever package management system you used.
- First install ssh server.
~$apt-get install openssh-server
- Edit sshdconfig file
~$vi /etc/ssh/sshd_config
- Disable password authentication by putting the following line
PasswordAuthentication no
- For keys file location, I prefer to put in file by user name
AuthorizedKeysFile /etc/ssh/keys/%u
- Save the file
- Copy the public key of the users and put in /etc/ssh/keys/
- Restart the ssh demon by entering the following command
/etc/init.d/ssh restart
That’s it! Your users need to use their private key to login to the server from now on.
Source : OpenBSD
Tags:
Related posts:
Leave a comment
Recent Posts
Recent Comments
- robost on How to install Vista bubble screen saver in Win XP
- Rick on Paint can create ico files
- Oliverdejohnson on Paint can create ico files
- Johnson Jones on Paint can create ico files
- Hussain on How to install fonts without admin right
Tags
Archives
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- November 2009
- July 2009
- May 2009
- April 2009
- January 2009
- October 2008
- September 2008
- August 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- November 2006
- February 2006
- January 2006
- December 2005

