Solved

Setup Putty SSH

Posted on 2012-12-20
3
640 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 250 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 78

Accepted Solution

by:
arnold earned 250 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

The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

Question has a verified solution.

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

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

726 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