Solved

How to remove SSH certificate from Linux

Posted on 2014-12-22
20
219 Views
Last Modified: 2015-02-18
I'm getting into a right muddle trying to determine where the SSH certificate is stored and the reference to it (the .conf file) on a Linux machine. I have been through all the conf files I can find but can't figure out how to disable SSH i.e. using a certificate. I think I have successfully renamed the certificate file but I use Spiceworks and this is somehow reporting to me that my certificate has expired, so I need to disable this somewhere, right?

thanks in advance.
0
Comment
Question by:fuzzyfreak
  • 6
  • 5
  • 4
  • +4
20 Comments
 
LVL 7

Expert Comment

by:Deadman
ID: 40512728
ssh-keygen -R
0
 
LVL 5

Expert Comment

by:Dilip Patidar
ID: 40512780
Hello,

Please try this.
ssh-keygen -R hostname

Dilip Patel
0
 
LVL 58

Expert Comment

by:Gary
ID: 40513758
Question is a bit confusing - what are you trying to do exactly?
disable SSH i.e. using a certificate
Are you trying to go back to password based login?
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

Assisted Solution

by:cspatter
cspatter earned 150 total points
ID: 40513870
Disabling the certificate will not fix your security problem.  If you no longer need SSL then you can just turn off SSL by removing the SSL directives from your httpd.conf or ssl.conf under Apache.  If you want to renew your certificate then you need to either ask the CA to renew your certificate; or you need to start the CSR process over to obtain a new certificate.  The certificate and key files should be specified again in your httpd.conf or ssl.conf files.

If you turn of SSL successfully, you will be listening on standard ports (80 or 9080 or 8080)

Thanks,
Chris
0
 
LVL 58

Expert Comment

by:Gary
ID: 40513882
SSH not SSL - unless the OP made a typo
0
 
LVL 4

Author Comment

by:fuzzyfreak
ID: 40514638
My apologies, yes, my bad, I meant SSL.  Just to give you some background. I use Spiceworks and it keeps nagging me about an expired certificate. We do not use SSL on our website, so I just need to disable the certificate (I am assuming that is all it will take to stop the message I see on my Spiceworks dashboard)
0
 
LVL 58

Expert Comment

by:Gary
ID: 40514932
@cspatter has it right then
0
 
LVL 4

Author Comment

by:fuzzyfreak
ID: 40515086
just turn off SSL by removing the SSL directives from your httpd.conf or ssl.conf under Apache

This is where I am muddled, I cannot find reference to SSL in any of my .conf files. Where do I start?
0
 
LVL 58

Expert Comment

by:Gary
ID: 40515102
No points or this
Search for 443 in your httpd.conf file or the ssl.conf file - remove the whole block <virtualhost>...
0
 
LVL 57

Expert Comment

by:giltjr
ID: 40517606
Look in the following directories for the files that Gary mentioned:

/etc/httpd/conf
/etc/httpd/conf.d
0
 
LVL 62

Expert Comment

by:gheist
ID: 40521665
uninstalling mod_ssl (or mod_gnutls or nod_nss)(tell your distribution to get command) will disable apache SSL listener for good.
It still does not free from task to upgrade OpenSSL/GnuTLS/NSS.
0
 
LVL 4

Author Comment

by:fuzzyfreak
ID: 40544833
There is no directory called /etc/httpd/
0
 
LVL 57

Expert Comment

by:giltjr
ID: 40545010
Where are your http configuration files?  Those are the normal directories.
0
 
LVL 62

Expert Comment

by:gheist
ID: 40545036
Maybe share your linux distribution and version so we dont pinch in the dark?
0
 
LVL 4

Author Comment

by:fuzzyfreak
ID: 40546587
Ubuntu 12.04 LTS (Precise)
0
 
LVL 62

Assisted Solution

by:gheist
gheist earned 350 total points
ID: 40546876
Should be 12.04.5 (Precise) by now.

apache config files are in /etc/apache2
Namely enabled modules are listed in ./mods_enabled

Please first upgrade your system to plug security holes, then disable what is no longer needed.
0
 
LVL 4

Author Comment

by:fuzzyfreak
ID: 40564049
I have got as far as looking in the /etc/apache2 directory as per comment above, but only .conf files in there are apache2.conf, ports.conf and httpd.conf - the latter being empty.
443 does exist in ports.conf - see below - which line do I remove/comment out?

# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
# This is also true if you have upgraded from before 2.2.9-3 (i.e. from
# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
# README.Debian.gz

NameVirtualHost *:80
Listen 80

<IfModule mod_ssl.c>
    # If you add NameVirtualHost *:443 here, you will also have to change
    # the VirtualHost statement in /etc/apache2/sites-available/default-ssl
    # to <VirtualHost *:443>
    # Server Name Indication for SSL named virtual hosts is currently not
    # supported by MSIE on Windows XP.
    Listen 443
</IfModule>

<IfModule mod_gnutls.c>
    Listen 443
</IfModule>
0
 
LVL 62

Accepted Solution

by:
gheist earned 350 total points
ID: 40564214
Comment out both listen 443 lines and that should do it.
0
 
LVL 4

Author Closing Comment

by:fuzzyfreak
ID: 40616841
Apologies for being so lax and confused on this issue, thanks all for your help.
0
 
LVL 62

Expert Comment

by:gheist
ID: 40617326
Dont panic. Now it is time tu upgrade glibc on your server too...
0

Featured Post

Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

Question has a verified solution.

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

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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…

809 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