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 […]
ssh
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 […]
Start a GUI Application on a Remote Computer using SSH
This article describes how to log into the remote computer (server) using SSH and run a GUI (graphical) application that requires screen. The GUI program will be displayed on the physical monitor, connected to that remote machine. Run a GUI Program on a Remote Computer’s Screen The Basic Procedure Log into a remote machine using […]
SSH Login Slow — Removing Delay
Problem: When I’m trying to log into the remote server via SSH, after I enter the UserName, it takes a lot of time before it displays the Password prompt. How to solve this problem? Solution: Basically, a long delay during authentication process is caused by “GSS API Authentication method” or/and by “UseDNS” option. The solution […]