?
Solved

Setup Putty SSH

Posted on 2012-12-20
3
Medium Priority
?
643 Views
Last Modified: 2013-01-02
1. How to configure the Centos such that it always need to check for the private key for user access without inputing any password directly ?

2. How to configure the Centos such that it always need to check for the private key + password before accessing the Centos ?

Thanks
0
Comment
Question by:AXISHK
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 1000 total points
ID: 38712220
1) in /etc/ssh/sshd_config:

PasswordAuthentication no
PubkeyAuthentication yes

will allow access only via key pair, not via password.

This is configurable on a per-user basis, by means of the "Match" directive.

2) Forcing checks of both Unix password and key pair is not possible.
A valid key (optionally including a passphrase, see below) is always considered sufficient to log in, an additional prompt for the Unix password is not provided.

You can add a passphrase to the key during key generation, so additionally to the key verification a passphrase prompt will take place, but this passphrase is part of the key and has nothing to do with Unix passwords.

In any case you're required to specify your private key in the local (Windows) PuTTY configuration (see below) and your public key in the ~/.ssh/authorized_keys file of the target user on CentOS.

Attention: Putty cannot directly open OpenSSH keys. If you created your key with ssh-keygen on CentOS you'll need to convert id_rsa to id_rsa.ppk using a program called puttygen.exe.
Specify the converted key in PuTTY under "Connection -> SSH -> Auth -> Private key file ...".
When saving the respective session this path will be saved as well.
0
 
LVL 79

Accepted Solution

by:
arnold earned 1000 total points
ID: 38712234
You would need to edit sshd_config and make sure to enable publickey while disabling password authentication.

What exactly are you looking todo.

Usually if both password and publickey based authentication is enable item 1 is the default behavior, the equivalent second option is part of the public key authentication dealing with you setting a passphrase n the key.
The number 2 you seem to want a two factor authentication.
Privatekey/server account password are on the same level I.e. one or the other, not sure there is a way to sequence them.
http://kiteplans.info/2012/04/06/two-factor-ssh-virtualmin-authentication-google-authenticator/
There are other options using rsa keyfab, github, etc.
0
 

Author Closing Comment

by:AXISHK
ID: 38738568
tks
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month10 days, 15 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question