Posts

Showing posts with the label SSH

How to Record SSH sessions and store into a file.

Many of admins are depend on Putty to record SSH session on a file, but what if you want do it without Putty in to Linux console? What if you want to show live SSH session with recording to someone else while he's also logged to same remote session? Here is the solution :) Use below command while connecting to remote host e.g. "10.20.30.40"; # ssh jerry@10.20.30.40 | tee -a ~/jerry_ssh_file.txt Now either you can see this recorded session later with below command; # cat ~/jerry_ssh_file.txt Or to see it like live session on another remote SSH console or on another terminal use; # tail -f ~/jerry_ssh_file.txt

How enable root SSH login on RHEL or CentOS 7

Image
SSH (Secure SHell) work on port number 22, which uses encryption to send data to remote host. Now a days we use it in place of Telnet. Files related to SSH configuration; /etc/ssh/sshd_config  - OpenSSH server configuration file. /etc/ssh/ssh_config  - OpenSSH client configuration file. ~/.ssh/  - Users ssh configuration directory. ~/.ssh/authorized_keys  or  ~/.ssh/authorized_keys  - Lists the public keys (RSA or DSA) that can be used to log into the user’s account /etc/nologin  - If this file exists, sshd refuses to let anyone except root log in. /etc/hosts.allow  and  /etc/hosts.deny  : Access controls lists that should be enforced by tcp-wrappers are defined here. SSH default port  : TCP 22 NOTE : After editing "sshd_config" file, please verify configuration and restart "sshd" service to come up with the enabled option. Verify your sshd_config file before restarting / reloading changes: #/usr/sbin/ss...