The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
If you separate your daily working machine from a remote high
performance cluster (HPC), the taskqueue package can
connect to the remote server using the R ssh library to run
tasks remotely.
For example, your daily working machine is daily-work
and the remote HPC head/login node is hpc-login. You can
submit and run tasks on hpc-login from
daily-work via an SSH connection.
To run tasks on a remote server, you must enable passwordless
SSH login from daily-work to the remote
server.
daily-work)hpc-login)ssh installed:
install.packages("ssh")Generate a new SSH key pair on your local machine
(daily-work):
What happens: - You’ll be prompted to choose a file
location (press Enter to accept the default:
~/.ssh/id_ed25519) - You’ll be asked to enter a passphrase
(press Enter twice for no passphrase, or enter a passphrase for
additional security) - Two files will be created: -
~/.ssh/id_ed25519 (private key - keep this secure!) -
~/.ssh/id_ed25519.pub (public key - this will be copied to
the remote server)
Note: If you already have an existing SSH key pair and want to use it, you can skip this step.
Install your public key on the remote server to enable passwordless login:
Replace user with your actual username on the remote
server.
What happens: - You’ll be prompted to enter your
password for the remote server - Your public key will be added to
~/.ssh/authorized_keys on the remote server - Future
connections will not require a password
Alternative method (if ssh-copy-id is not
available):
cat ~/.ssh/id_ed25519.pub | ssh user@hpc-login "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys"Windows users:
If using PowerShell on Windows:
Or use a Git Bash terminal for the Unix-style commands.
Verify that passwordless SSH login works:
Expected result: - You should be logged into the
remote server without being prompted for a password - Type
exit to close the connection
Verify the connection works from R:
library(ssh)
# Create SSH session
session <- ssh_connect("user@hpc-login")
# Run a test command
ssh_exec_wait(session, command = "hostname")
# Disconnect
ssh_disconnect(session)If this works without prompting for a password, your setup is complete!
Check file permissions on the remote server:
Verify your public key was added:
You should see your public key listed.
If you saved your key with a non-default name, you may need to specify it:
Or add it to your SSH config file (~/.ssh/config):
Host hpc-login
HostName hpc-login.example.com
User user
IdentityFile ~/.ssh/my_custom_key
~/.ssh/id_ed25519) - keep it secure on your local machine
onlychmod 600 ~/.ssh/id_ed25519chmod 700 ~/.sshauthorized_keys filesThese binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.