Specifying a port when connecting with SSH

Some servers run their SSH server on a different port than 22 for a variety of reasons, including security. To specify a custom port when connecting, use the -p flag as in the example below: ssh user@server.com -p 2222 In this example, the client would attempt to connect using port 2222.

Fix garbled file names in SMB shares

If you have files in your SMB networked folders that look like this: TRZB4~J.mp4, there is a very easy fix to get the original file names. Open your smb.conf file (usually at /etc/samba/smb.conf) and add the following line under [global]: mangle case = no mangled names = no Once this is done, enter the following […]

Ping once and return true/false

The ping command will usually try pinging a device forever, returning the response time after each pingback. If you want to ping a device once and use the answer to perform an action, use the following snippet: ping -c 1 [your ip or hostname] > /dev/null This command will either return 1 on failure or […]