The sftp command is a secure alternative to ftp and is functionally the same as ftp. Use sftp instead of ftp when logging on to a server that is running the OpenSSH daemon, sshd. The major difference between sftp and ftp is that the former uses encryption to transfer password over network whereas the later […]
Archives for November 2017
How to create and mount Btrfs file system (explained with examples)
Btrfs is an open-source, general-purpose file system for Linux. The name derives from the use of B-trees to store internal file system structures. Different names are used for the file system, including “Butter F S” and “B-tree F S.” Development of Btrfs began at Oracle in 2007, and now a number of companies (including Red […]
Understanding rsyslog Actions
Actions specify what to do with the messages filtered out by a selector. The following are some of the available actions. Saving rsyslog Messages to Log Files To save an rsyslog message to a log file, specify the absolute path to the log file after the selector. The following example selects all cron messages and […]
Understanding rsyslog Filter Options
The rsyslogd daemon offers three different ways to filter rsyslog messages: 1. Facility/Priority-Based Filters 2. Property-Based Filters 3. Expression-Based Filters Facility/Priority-Based Filters Facility/priority-based filters filter rsyslog messages based on two conditions: 1. facility 2. priority Facility specifies the subsystem that produces the message. Examples of facilities include mail, kernel, and cron. Priority represents the priority […]
How to Connect Remote Host Using the ssh Command
The ssh command allows you to connect to a remote system, or to execute a command on a remote system. The format of the ssh command to connect a remote system is: # ssh [options] [user@]host [command] The host argument is the name of the server that you want to connect to, and is the […]
CentOS / RHEL : How to Install and Configure OpenSSH Server and Client
OpenSSH (Secure Shell) is a suite of network connectivity tools that provides secure communications between systems. OpenSSH tools include the following: ssh: Secure shell logs on or runs a command on a remote system scp: Secure copy sftp: Secure ftp (file transfer protocol) sshd: The OpenSSH daemon ssh-keygen: Creates ECDSA(Elliptic Curve Digital Signature Algorithm) or […]
How to Transfer files securely using SCP Command in Linux
The scp(secure copy) command allows you to copy files or directories (use the -r option to copy directories) between remote systems. A connection is established, files are copied, and the connection closes. Transfer file from local server to remote server To copy a file to a remote system (upload), the format of the scp command […]
Understanding OpenSSH Configuration Files
OpenSSH clients and servers have several configuration files. Global configuration files are stored in the /etc/ssh directory. User configuration files are stored in an .ssh directory in user home directories (~/.ssh). /etc/ssh: Global Files The following are brief descriptions of the global configuration files under /etc/ssh directory. # ls -lrt /etc/ssh total 156 -rw——- 1 […]
How to disable timeout in ssh during login prompt (login session inactivity) in Linux
You are one of those guys who need more time while putting in the credentials during ssh logins, but due to the login session inactivity timeout, you are not able to login into the system in time. # time ssh -l testuser server01 Password: Connection closed by 192.168.10.10 real 2m06.000s user 0m0.015s sys 0m0.004s This […]
CentOS / RHEL : How to setup session idle timeout (inactivity timeout) for ssh auto logout
There are two options related to ssh inactivity in /etc/ssh/sshd_config file: ClientAliveInterval ClientAliveCountMax So the timeout value is calculated by multiplying ClientAliveInterval with ClientAliveCountMax. timeout interval = ClientAliveInterval * ClientAliveCountMax The meaning of the two parameters can be found in the man page of sshd_config: # man sshd_config ClientAliveCountMax Sets the number of client alive […]