Starting from Windows 10 build 1809, Windows has a native SSH client that is based on the OpenSSH port. The OpenSSH client in Windows includes an ssh-keygen – the command-line tool for creating authentication keys for SSH. To create a pair of SSH keys in Windows, the ssh-keygen command can be executed from a Windows […]
ssh
Bad owner or permissions on ‘.ssh/config’ [SOLVED]
Starting from Windows 10 build 1809, Windows has a native SSH client that is based on the OpenSSH port. If you try to connect to some host from a Windows command-line prompt (CMD) or PowerShell using the ssh command, you may receive the error as follows: Bad owner or permissions on C:\\Users\\<username>/.ssh/config This short note […]
SSHPass: SSH Login With Password – Command Line
A password-based authentication is often a default way to connect to a remote host over SSH. But as it requires a user to enter a password manually, this creates some complicity if you need to automate the SSH login. This note shows how to login over SSH by passing the password as a parameter on […]
Signing Failed: Agent Refused Operation [SOLVED]
While attempting to connect to some server over SSH, you may get the error as follows: sign_and_send_pubkey: signing failed for RSA “/home/<username>/.ssh/id_rsa” from agent: agent refused operation The “agent refused operation” error is usually caused by too open permissions on a private key file. In this short note i am showing how to fix this […]
SSH Fingerprint: Get Fingerprint of SSH RSA Key
The fingerprint is a unique sequence of letters and numbers used to identify the SSH RSA key. It is the fingerprint of a key that is verified when you try to connect to a remote host using SSH. In this note i will show how to generate the md5 and sha256 fingerprints of the SSH […]
SSH: Create Public Key from Private
Usually a public SSH key is generated at the same time as a private key. Unlike a private SSH key, it is acceptable to lose a public key as it can be generated again from a private key at any time. In this small note i am showing how to create a public SSH key […]
HowTo: Disable SSH Host Key Checking
By default, the SSH client verifies the identity of the host to which it connects. If the remote host key is unknown to your SSH client, you would be asked to accept it by typing “yes” or “no”. This could cause a trouble when running from script that automatically connects to a remote host over […]
HowTo: Clear or Remove Last Login History in Linux
From the following article you will learn how to clear or remove the last login information on a Linux server from the command line. On the Linux systems there are three standard commands that show the information about last logged in users: last, lastb, and lastlog.
Fail2Ban: Install and Config – Ubuntu, CentOS – Protect SSH
Fail2ban helps to protect Linux servers from brute-force and DDOS attacks. It scans logs for IP addresses that show the malicious signs and bans that IP addresses for a specified amount of time using iptables. This article describes how to install and configure fail2ban on Ubuntu, CentOS and similar Linux distributions. You’ll also learn how […]
SSH: Execute Remote Command or Script – Linux
This is quite a common task for Linux system administrators, when it is needed to execute some command or a local Bash script from a one Linux workstation or a server on another remote Linux machine over SSH. In this article you will find the examples of how to execute a remote command, multiple commands […]