May 31, 2020
Make SSH Connections Faster by Reusing an Existing Connection —
To avoid the overhead of connection set up and authenticating to a remote host each time, SSH provides a cool feature to reuse an already authenticated SSH connection with ControlMaster and ControlPath configuration directives.…
May 28, 2020
Make Use of ssh_config File to Store SSH Connection Configurations —
When making an ssh connection, instead typing full hostname, port number or username each time it can be stored in user’s local ssh config file (~/.ssh/config) to save time.
This config file begins with Host directive and all configurations specified below applies to hosts matching the pattern specified in Host directive.…
May 24, 2020
Forward Local Connections to Remote Hosts With SSH Tunneling —
Secure Shell(SSH) is a versatile protocol and can be used for various purposes other than remote command execution. One such purpose is to tunnel local port or socket to a remote host’s port or socket.…
May 23, 2020
Calculate Running Sum in a Query Using SQL Variables —
When you have to calculate a running sum over a period of time, say calculate count of users in application month by month, user defined variables can be used to make the query simpler.…
May 6, 2020
Convert Multiple Rows to a Single Column in MySQL —
MySQL provides an in built aggregate function called GROUP_CONCAT() to convert data in multiple rows into a single column.
SELECT location, GROUP_CONCAT(fist_name) FROM user GROUP BY location; Above query will return comma separated first_name of users grouped by their location.…