Writing shell scripts leaves a lot of room to make mistakes, in ways that will cause your scripts to break on certain input, or (if some input is untrusted) open up security vulnerabilities. Here are some tips on how to make your shell scripts safer.
Source: Writing Safe Shell Scripts (MIT Student Information Processing Board)
In this tutorial, we will cover SSH port forwarding in Linux. This is a function of the SSH utility that Linux administrators use to create encrypted and secure relays across different systems.
SSH port forwarding, also called SSH tunneling, is used to create a secure connection between two or more systems. Applications can then use these tunnels to transmit data.
Source: SSH port forwarding (tunneling) in Linux – Like Geeks
We’ve used Etcher several times, mostly to make a bootable SD card for a Raspberry Pi or to put a bootable image of a Linux distribution onto a USB thumb drive. But we’re rethinking that now because we’ve read some concerns about privacy when using Etcher, or balenaEtcher as it is now called. … All we wanted to point out is that if you do have any concerns about using Etcher or balenaEtcher, there are alternatives, depending on which operating system you are using:
Source: If you have privacy concerns regarding Etcher (now known as balenaEtcher), here are some alternatives – Two “Sort Of” Tech Guys
peco (pronounced peh-koh) is a CLI utility that filters text interactively. The tool is written in the Go programming language.
Source: Excellent Utilities: peco – interactive filtering tool – LinuxLinks
Most guides to bash history shortcuts exhaustively list all of the shortcuts available to you.
The problem I always had with that was that I would use them once, and then glaze over as I tried out all the possibilities. Then I’d move onto my working day and completely forget them, retaining only the well-known !! trick I learned when I first started using bash.
So most never got committed to memory.
Here I outline the shortcuts I actually use every day.
Source: Seven God-Like Bash History Shortcuts You Will Actually Use – zwischenzugs
Some Internet service providers and corporate companies might have blocked most of the ports, and allowed only a few specific ports such as port 80 and 443 to tighten their security. In such cases, we have no choice, but use a same port for multiple programs, say the HTTPS Port 443, which is rarely blocked. Here is where SSLH, a SSL/SSH multiplexer, comes in help. It will listen for incoming connections on a port 443. To put this more simply, SSLH allows us to run several programs/services on port 443 on a Linux system. So, you can use both SSL and SSH using a same port at the same time. If you ever been in a situation where most ports are blocked by the firewalls, you can use SSLH to access your remote server. This brief tutorial describes how to share a same port for https, ssh using SSLH in Unix-like operating systems.
Source: SSLH – Share A Same Port For HTTPS And SSH – OSTechNix
Related: Install sslh on Mac OSX
In this tutorial, we learn how to use curl command in linux. Expained with examples to download single and mutiple files from remote server.
Source: How to Use Curl Command with Examples (Linoxide)
By default, ssh server performs a reverse DNS lookup for authentication requests. This can be so annoying as you wait ten’s of seconds for the lookup to finish. You may experience a delay before receiving a password prompt while accessing a remote system via ssh.
This guide will show you how to disable SSH reverse DNS lookups in a Linux/Unix system. The method discussed here works for all Linux and Unix based operating systems running OpenSSH Server.
Source: How To Disable SSH reverse DNS Lookups in Linux/Unix system – Computing for Geeks
From the man page of rsync, Rsync is a fast and extraordinarily versatile file copying tool. It can copy locally, to/from another host over any remote shell, or to/from a remote rsync daemon. It offers a large number of options that control every aspect of its behavior and permit very flexible specification of the set of files to be copied. It is famous for its delta-transfer algorithm, which reduces the amount of data sent over the network by sending only the differences between the source files and the existing files in the destination.
Source: How to use rsync command on Linux/Unix with examples – Computing for Geeks
Introduction The scp command is used to copy files and directories between one computer to another. What is valuable about this utility is the fact that it used ssh to tunnel the copying. This means that the data is encrypted because it rides on ssh’s secure features.
Source: How to use scp command to securely transfer files with examples – Computing for Geeks