Link: SSH Kung Fu

OpenSSH is an incredible tool. Though primarily relied upon as a secure alternative to plaintext remote tools like telnet or rsh, OpenSSH (hereafter referred to as plain old ssh) has become a swiss army knife of functionality for far more than just remote logins.

I rely on ssh every day for multiple purposes and feel the need to share the love for this excellent tool. What follows is a list for some of my use cases that leverage the power of ssh.

Full article here:
SSH Kung fu (Tyblog)
Related:
Generate Elliptic Curve (ECDSA) SSH Keys (scottlinux.com)

Link: Remotely copy files to and from your Raspberry Pi

Most of the time I remotely log into my Raspberry Pi. Depending on what I am doing I will either SSH into it or VNC into it, which allows me to do almost whatever I would like to.

I say almost as there is a caveat.

What happens when I want to transfer a file to or from the Raspberry Pi?

I have to find a memory stick, plug it into my computer, copy the files onto it, unplug it, plug it into my Raspberry Pi, go back to my computer, copy the files over…

Then if I happen to modify a file and want to transfer it back I go through the whole process again.

What an absolute pain!

There must be a better way… Well you will be pleased to know there is!

Full article here:
Remotely copy files to and from your Raspberry Pi (Trevor Appleton)

Link: Linux Terminal: sshfs, Remote directory over ssh

Often one wants a shared access to files across machines. Traditionally one uses the network file system (nfs). The network file server works as follows: There is an nfs server that exports some directories in its filesystem hiearchy to various nfs clients that mount these directory over the network into their file system hierarchy. As a result, each of the clients shares the directories exported by the nfs server.

However a lot of times you just have to mount a directory from a server to your local computer and in these cases NFS it’s not so useful, sshfs it’s much better

Sshfs is a filesystem client based on the SSH File Transfer Protocol. Since most SSH servers already support this protocol it is very easy to set up: i.e. on the server side there’s nothing to do.  On the client side mounting the filesystem is as easy as logging into the server with ssh.

Full article here:
Linux Terminal: sshfs, Remote directory over ssh (Linuxaria)

Link: Manage Multiple SSH Connections Easily With PAC Manager [Linux]

If you have used SSH to connect to a remote machine before, you know the procedure: open a terminal, type in the SSH command and the host IP, enter the password. This is probably easy for a single connection, but if you are a system administrator looking after several remote machines and have a need to manage multiple SSH connections, you will need a better and easier solution. You need PAC Manager.

Full article here:
Manage Multiple SSH Connections Easily With PAC Manager [Linux] (Make Tech Easier)

Link: How to remote control Raspberry Pi

Once you have a fully working Raspberry Pi system, it may not be convenient for you to continue to access Raspberry Pi directly via a keyboard and HDMI/TV cable connector dedicated to Raspberry Pi. Instead, you will want to remote control “headless” Raspberry Pi from another computer.

In this tutorial, I will show you how to remote control your Raspberry Pi in several different ways. Here I assume that you are running Raspbian on your Raspberry Pi. Also, note that you are not required to run desktop on Raspbian when trying any of the methods presented in this tutorial.

Actually that last quoted line does not appear to be quite correct — the first three methods shown don’t require a desktop, but the fourth involves using VNC, which pretty much assumes a desktop will be present. And if were were considering using VNC, we might also want to consider Nomachine NX, which can support multiple simultaneous sessions that each have a separate, independent desktop, and is also faster than VNC in some situations. Although, we’ve never tried installing it on a Raspberry Pi.

Also, some or all of these tips may be useful for controlling Linux remotely regardless of the actual hardware that is in use — in other words, these are by no means exclusive to the Raspberry Pi.

Full article here:
How to remote control Raspberry Pi (Xmodulo)

Link: Mosh – A replacement for SSH

Mosh(mobile shell) is Remote terminal application that allows roaming, supports intermittent connectivity, and provides intelligent local echo and line editing of user keystrokes.

Mosh is a replacement for SSH. It’s more robust and responsive, especially over Wi-Fi, cellular, and long-distance links.

Mosh is free software, available for GNU/Linux, FreeBSD, Solaris, Mac OS X, and Android.

YouTube video link: Mosh: An Interactive Remote Shell for Mobile Clients

Full article here:
Mosh – A replacement for SSH (Ubuntu Geek)

Link: Run Automated Scripts Over SSH

We’ve shown you how to use SSH to transfer files securely. But there’s a major issue with SSH’s default behaviour. You are only connected with the remote machine after you’ve manually entered the password which rules it out for any tasks you want to run unattended. Or does it?

Here’s a quick lowdown on how the OpenSSH CLI tools (scp and sftp) work so that you can better appreciate the issue. When you want to copy over files to or from the remote host, you can use scp which automatically initiates a SSH connection to the remote host. Every time you run a scp command it establishes a new connection to the remote. So if you have multiple scp commands you’d be entering the same password several times.

This is why you wouldn’t want to use scp in any scripts you want to run unattended. There’s also the fact that if you have multiple accounts on several machines on the network, you’d have trouble memorizing unique, strong passwords for each.

To overcome this problem, you need to switch OpenSSH’s default authentication mechanism to a key-based system.

Full article here:
Run Automated Scripts Over SSH (Make Tech Easier)

Link: Debian and Ubuntu Linux: Set openssh SeverKeyBits to 1024

The upstream openssh project sets the value ServerKeyBits to 1024, but Debian and Ubuntu currently unfortunately have a lower security setting of 768 bits. I’ve filed a bug to fix this. In the meantime, here is how to make that change now!

Full article here:
Debian and Ubuntu Linux: Set openssh SeverKeyBits to 1024 (scottlinux.com)