Solved

How to: Disable SSH public key authentication on RedHat Linux server

Posted on 2014-10-08
13
337 Views
Last Modified: 2014-11-22
I have a RedHat server and would like to remove SSH public key authentication on it, so that i can SSH into it without needing a key.

What I have already tried is this:
Added PubkeyAuthentication No into /etc/ssh/sshd_config config file. Then ran the command sudo /etc/init.d/sshd reload
0
Comment
Question by:cgruber
  • 4
  • 4
  • 2
  • +2
13 Comments
 
LVL 8

Expert Comment

by:Pepe2323
ID: 40369729
Hi

that option that you set on ur sshd_config will force you  to authenticate only by password, this is what you want ??

Regards.
0
 

Author Comment

by:cgruber
ID: 40369762
Well at the moment when I try to connect to the server via SSH using putty.exe, as soon as I type in the username (root) a popup appears saying.

"Disconnected: No supported authentication methods available (server sent: gssapi-with-mic)"
0
 
LVL 13

Expert Comment

by:Sandy
ID: 40370068
paste your ssh config file

TY/SA
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

Author Comment

by:cgruber
ID: 40370133
shh or sshd?
0
 
LVL 13

Expert Comment

by:Sandy
ID: 40370136
sshd_config
0
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 40370286
@cgruber - Always keep one session open to a server that you're changing the ssh config for. That way you can test the new configuration using a second session and rollback if the change isn't working.

Add this to your ssh config file:

PasswordAuthentication yes
0
 
LVL 13

Expert Comment

by:Sandy
ID: 40370289
agree with GJ

TY/SA
0
 
LVL 29

Expert Comment

by:serialband
ID: 40372000
Why don't you just use a key?  It's not that difficult to create and use.  If you're using putty, you can run pagent.exe and load your key until the next reboot.
0
 

Accepted Solution

by:
cgruber earned 0 total points
ID: 40407442
Anyone can help at all?
0
 
LVL 13

Expert Comment

by:Sandy
ID: 40407806
What you have done seems correct.. Now please tell us what exactly the help you are looking at ?


TY/SA
0
 
LVL 29

Expert Comment

by:serialband
ID: 40411545
What other entries are in your sshd_config?  The default settings allow for both password and passphrase access.  This suggests that you have an entry that disables access.
0
 

Author Closing Comment

by:cgruber
ID: 40459259
Deleted config file and re-created. Set Pubkeyauthentication to No and it works now.
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

828 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