NMRhub now requires an SSH key pair to connect. Use SSH / SFTP / rsync and tools like FileZilla to connect to NMRhub virtual machines (VMs).
After following the instructions at NMRbox User Dashboard SSH Key Setup, your private key should be at:
$HOME/.ssh/id_ed25519
%HOMEDRIVE%%HOMEPATH%\.ssh\id_ed25519
ssh -vvv
to verify if SSH is attempting to use your private key.If you can’t connect after uploading your SSH key, verify the following commands give the same result. Windows users should run these commands from PowerShell:
ssh-keygen -lf $HOME/.ssh/id_ed25519
ssh-keygen -lf $HOME/.ssh/id_ed25519.pub
Ensure the key listed at NMRbox User Dashboard SSH Key matches your $HOME/.ssh/id_ed25519.pub
.
If your home directory is writable by anyone other than you, SSH will not work. Connect via VNC and run:
ls -l ~
If w
appears after the first group of permissions (e.g., drwx
), use the following command to correct it:
chmod go-w ~
rsync
?Add the following option to your rsync
command:
-e "ssh -i /path/to/your/private_key"
sftp
?Add the following option to your sftp
command:
-i /path/to/your/private_key
Go to FileZilla’s Site Manager and make the following settings in the General tab. You can leave the port blank, as it defaults to the correct value (22).
scp
from a shared account?(Note: This is not an endorsement of shared accounts, but that is a site-specific decision.)
If multiple users are using a shared account (e.g., from a spectrometer console), the following steps will allow copying local data to each user’s account. For this example, we assume your username is rernst
.
Create another SSH key pair with a passphrase:
ssh-keygen -t ed25519 -C "spectrometer scp"
Generating public/private ed25519 key pair.
Enter file in which to save the key (/Users/rernst/.ssh/id_ed25519): id_ed25519rernst
Enter passphrase (empty for no passphrase): <type a password>
Enter same passphrase again: <retype the password>
Your identification has been saved in id_ed25519rernst
Your public key has been saved in id_ed25519rernst.pub
Add the contents of id_ed25519rernst.pub
to NMRbox User Dashboard SSH Key.
Go to the home directory of the shared account. Create an .ssh
directory if necessary and ensure it has permissions drwx------
:
cd $HOME
mkdir -p .ssh
chmod 700 .ssh
Create or edit ~/.ssh/config
and add the following lines:
Match User rernst Host *.nmrbox.org
IdentityFile ~/.ssh/id_ed25519rernst
You should now be able to copy data from the shared account to nmrbox.org
:
scp fid rernst@*element*.nmrbox.org:
When prompted:
Enter passphrase for key 'home_directory/.ssh/id_ed25519rernst':
Enter the password you used when creating the key pair.