Security Auditing Tool – “ssh-audit”

Author:
Introduction

In this post, I will provide a comprehensive guide on how to use the “ssh-audit” tool to audit your SSH Server or client. SSH (Secure Shell) is a popular cryptographic network protocol that allows secure communication between two computers. However, like any other network protocol, SSH is not completely immune to vulnerabilities. That’s where the “ssh-audit” tool comes in. It is a powerful tool that helps you to perform a comprehensive audit of your SSH server or client. By using this tool, you can identify any potential security vulnerabilities and take appropriate measures to secure your SSH communication. In this post, I’ll walk you through the step-by-step process of using the “ssh-audit” tool and interpreting its output to secure your SSH communication.

Check out my YouTube channel if you prefer video content over written posts. Here’s the link to the video:

MacOS

There are two ways to run ssh-audit on your macOS operating system.

1. Homebrew
The first option is to use the Homebrew package manager. You can install Homebrew by running the following command in your terminal:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Once you have installed Homebrew, you can install ssh-audit by running the following command:

brew install ssh-audit

To run ssh-audit:

ssh-audit IP_Address_of_SSH_Server -p 2222

Use -p and specify the port number only if the SSH Server doesn’t use the default port 22.

2. Clone Github Package
The second option is to download the package and run the ssh-audit.py script. You can download the package using the below command:

git clone https://github.com/jtesta/ssh-audit

Set Read, write, and execute permissions to the owner of the file:

chmod 755 ssh-audit.py

To run ssh-audit, enter the below command:

cd Downloads/ssh-audit
./ssh-audit.py IP_Address_of_SSH_Server -p 2222

Use -p and specify the port number only if the SSH Server doesn’t use the default port 22.

Linux

1. Debian Linux

  • Download the package using the git command:
git clone https://github.com/jtesta/ssh-audit
  • Change permission for ssh-audit.py
chmod 755 ssh-audit.py
  • Change the directory to ssh-audit using the ‘cd’ command
cd ssh-audit/
  • To run ssh-audit, simply use the following command:
./ssh-audit IP_Address_of_SSH_Server -p 2222
  • Use -p and specify the port number only if the SSH Server doesn’t use the default port 22.

2. Kali Linux

  • To install ssh-audit, simply use the following command:
sudo apt update
sudo apt install ssh-audit
  • To run ssh-audit, simply use the following command:
ssh-audit IP_Address_of_SSH_Server -p 2222
  • Use -p and specify the port number only if the SSH Server doesn’t use the default port 22.
Windows

1. Download Python
Unlike Linux and MacOS, Python is not pre-installed on Windows. Therefore, you need to download and install Python before executing the ‘ssh-audit’ script.

https://www.python.org/downloads/

2. Download ‘ssh-audit’ zip package

  • Open the link below to download ‘ssh-audit’
https://github.com/jtesta/ssh-audit
  • Extract the zip file.

3. Run ‘ssh-audit’

  • First, change the directory where the ‘ssh-audit.py’ is located using the cd command:
cd "C:\Users\SYSADMIN102 LLC\Downloads\ssh-audit-master"
  • To run ssh-audit, simply use the following command:
py ssh-audit.py IP_Address_of_SSH_Server -p 2222
  • Use -p and specify the port number only if the SSH Server doesn’t use the default port 22.
Ways to support my channel

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Translate »