Copying files from one linux server to another via SSH

Ever wanted to copy files from one linux server to another, via SSH? Here’s the command: scp -P 22 -r /home/username/local-directory ip-or-hostname-of-remote-server:/home/username/remote-directory. scp = Secure Copy. -r = Recursive (copy the contents of the directory and the contents of any directories inside that directory). -P = (specifying the port number). 22 = The port number […]

Check for a Process and Start It if It’s Not Started (Linux/Unix)

I came across a conundrum some time ago. I have a CentOS Linux based VPS running a few various different ‘processes’ for different purposes. My problem was that from time to time, these processes would stop or die, for whatever reason. Given that I require absolute uptime from these processes (or at least as close […]