LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-01-2012, 04:33 AM   #1
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: San Antonio, Texas
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,452

Rep: Reputation: 85
ssh keys only login


I have read and found how to allow users to only ssh with keys, not permit password login. Many users create weak passwords, so I want to force users of my server to login with keys. ssh brute force is very common. However, I'd like to be able to login with a secure password I use for my user from anywhere that I may not have access to my ssh public key. Is there a way I can prevent all users but my user to login through using a password and the rest, keys only?
 
Old 12-01-2012, 06:59 AM   #2
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
It can be done using passphrase mechanism & then ask your users to once generate a passphrase for login, instead of a simple password. It can be done by generating ssh keys for the users whom you want to give access with a stong password. On the other hand, for youeself do not use such ssh key, but only password.
 
Old 12-01-2012, 06:59 AM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
Try adding this to the bottom of your sshd_config file and restart the sshd daemon.

Match User yourusername
PasswordAuthentication yes

I don't know if it will override a global "ChallengeResponse No" setting however.
The options you can use in a match clause are listed in the man 5 sshd_config man page.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh login using keys bittus Linux - Newbie 5 11-30-2007 06:55 AM
Using SSH keys with different login name - is it possible? Micro420 Linux - Networking 5 02-04-2007 02:34 PM
Can't login with ssh pub keys fisayo Mandriva 2 11-17-2005 07:12 PM
SSH Login - Forcing keys! jackster Linux - Security 5 01-25-2005 08:09 AM
Can't login using ssh keys linuxboy69 Linux - Software 2 03-19-2004 02:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration