Warning |
---|
WarningIncorrectly configuring ssh keys can leave your accounts vulnerable to attack and, more importantly, can provide attackers with a trivial means to transfer their attacks to other systems and organizations. Organizations you are affiliated with may require you to maintain certain standards of personal IT security to help limit the risk of their systems being compromised. Please consult their IT security policies and staff. Regardless of policy, you should consider it your responsibility to help avoid the compromise of any system you have been given access to by deploying safe IT security practices. |
Panel | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
Panel | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
SSH Security
|
Background Anchor Background Background
On the surface, using SSH keys, with a passphrase, appears no different to using just a password.
One difference is that the ssh private security token is at the source end, not at the remote destination - along with the authentication method, this means keys are much harder to brute-force attack. Another difference is that the keys are your responsibility and under your control, not that of the system (local or remote). These differences allows keys to be used in more interesting and flexible ways than passwords, yet still provide security. There are two particular usage patterns that may be of interest to you in making the most of NCI systems:
The second of these we will cover in detail below.
Note that it is easy to unwittingly subvert SSH security if you are not careful when setting up restricted commands.
Seek advice if you are unsure.
Anchor | ||||
---|---|---|---|---|
|
NCI users often have chained workflows requiring automated transferring of files to, or from, remote systems or performing other operations on those systems.
Since the scheduling of these operations is driven by a batch controlled workflow, it is not feasible to be relying on entering a password or passphrase at the time of the operation. If the ssh keys are restricted to allow only those remote commands that are needed for the file transfers, then passphraseless keys can be used with some degree of security.
Usually, you are unaware of what commands are executed at the remote end when using a file transfer utility. Finding out what those commands are and configuring ssh to use them securely is, generally, non-trivial.
Fortunately, the work has already been done for rsync
. On a Linux system, with rsync
installed, you will most likely find a file at a similar location to /usr/share/doc/rsync/support/rrsync
which is a "restricted rsync command target".
The general idea is to
authorized_keys
on the target system (assumed to be your home institution).Panel | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||
Make sure
The above example is passphrase-less - just hit 'enter' when prompted for a passphrase. 3. Add the
4. On Gadi use something similar to:
to archive a directory on Gadi to a directory on the remote system under the nominated archive directory there. |
Authors: Mohsin Ali, Andrew Wellington