October 2024
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
28293031  

Categories

October 2024
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
28293031  

CHANGE OPENSSH PORT OR LISTEN TO MULTIPLE SSH PORTS

OpenSSH usually listens on TCP port 22. However, there are some people who wish to change OpenSSH port to avoid brute-force bot attacks or to avoid from being blocked by restrictive firewall.

To change OpenSSH port, one only need to edit “/etc/ssh/sshd_config” file and change the port at “Port 22” to something else, like “Port […]

Change the default SSH port and alter SELinux

Security through obscurity is not something one would generally recommend. But to thwart the effort of automated scanners changing the default OpenSSH port will yield you less pain in every day life. This will not fend off directed attacks or nullify vulnerabilities or bad security design.

Should you see an error message such as

shd[14221]: […]

GET PROCESS THREAD

#!/bin/bash if[ $# -lt 1 ] ; then echo “Usage: “ echo ” threads_per_process.sh PID | process name [count] “ echo “” echo “Example” echo ” PID: 36434 or” echo ” process string: NumThreads (this script will do a ps -ef|grep NumThreads to get the PID)” echo ” The last number is the number […]

Generating an OpenSSH Public Key and Converting it to SecSh Format

Introduction

Whilst reviewing access requirements at a number of sites, we’ve found the need to make several different implementations of SSH clients and servers interoperate succesfully.

This document outlines how to convert keys between OpenSSH, SSH.com (F-Secure), Sun SSH, and PuTTY implementations, using a DSA key for our examples, and also illustrates basic server-side setup […]

SSH login without password

we need an automatic login from host A / user a to Host B / user b. You don’t want to enter any passwords, because you want to call sshfrom a within a shell script.

How to do it

First log in on A as user a and generate a pair of authentication keys. Do […]

SSH Keys

Introduction

Ssh keys (key biased authentication) can be used as an alternate to using your user’s login password (password authentication) to access a ssh server. Keys can be used with or without a password (not to be confused with the login password).

This document is intended as an introduction to using ssh keys to log […]

Securing SSHd on CentOS 6

CentOS6.0 no longer uses faillog for keeping track of failed login attempts. Here’s an easy way to get up login tracking, and SSH time outs for PCI compliance, or just for a nice secure system.

Firstly you want to edit /etc/ssh/sshd_config to set up a timeout for SSH. You want to change the following lines;

[…]

Delay in SSH Login Prompt

Delay in SSH Login Prompt

You may came across this situation. At the time of logging in the shell prompt using SSH, – Connection will be taking a fraction of second – After/While entering the Password its taking more time to provide the shell prompt. To fix this issue: This is related to DNS. We […]

Securing SSH

Securing SSH

 

SH is how most administrators connect to their servers. It is also one of the most commonly attacked ports on a Linux Server. If you followed my previous tutorial about how to install fail2ban, you’ve probably noticed that you receive many emails about failed attacks. In this tutorial, I’ll show a few […]

Best SSH Commands / Tricks

Best SSH Commands / Tricks

 

OpenSSH is a FREE version of the SSH connectivity tools that technical users of the Internet rely on. Users of telnet, rlogin, and ftp may not realize that their password is transmitted across the Internet unencrypted, but it is. OpenSSH encrypts all traffic (including passwords) to effectively eliminate […]