On Ubuntu or Mac, first you need to generate an rsa ssh public/private keypair using the command:
ssh-keygen -t rsa
Next you may need to force the daemon to load the new private key, and confirm it's loaded:
ssh-add; ssh-add -l
Then get the contents of the public key with:
Copy the entire output to your clipboard, then paste that into the "Change SSH Key" text box under console/account.
The key text includes the opening "ssh-rsa" part and the ending "user@something" part.
If you don't copy the entire thing, it won't work.
We connect you to a tmux session by default for reliability. You can create a new bash terminal window with "ctrl+b,c" (press ctrl and b, followed by c), and switch with "ctrl+b,n".
But google "tmux cheat sheet" or "tmux guide" for more info.
Windows does not have native SSH key generation or SSH capability. This guide covers free Windows tools that can generate SSH keys, SSH into Vast instances and transfer files back and forth between the Windows machine and instances.
Most machine learning and AI programming is done on Linux. We recommend biting the bullet and installing a Linux subsystem on your Windows machine, like WSL.
Start by downloading and running the appropriate version of Puttygen.exe.
Make sure that the RSA key type is selected and then hit the "Generate" button. You will move your mouse cursor around to generate some randomness for the key. Then select the entire Public key (double check you get every character starting with ssh) and copy it to the clipboard like this:
Now login to your Vast account. Paste the contents of your clipboard in the "Change SSH Key" section and hit the blue SET SSH KEY button. Your new SSH key is now set for all new instances and will be propagated to running instances after 15ish minutes.
Go back to Puttygen. You will need to change the key format before you can save the private key. At the top level menu select Key->Parameters for saving key files. That will pop up the dialog. Change the PPK file version to 2. Hit OK to save the change.
Now you can hit the "Save private key" button to save your private key into a local folder. Ignore the passphrase warning. Remember where you store the key as you will need to specify the path to the key when using Putty.
Now that you have your SSH keys setup, it is time to rent an instance. First make sure you have added credits to your account. Then go to the create instance page and click on the Edit Image & Config in the upper left of the interface to specify the OS Image and type.
Typical OS Images such as Pytorch are preloaded. Select an empty template slot to use a custom OS Image. Pick if you want Jupyter installed or to run it as an SSH instance. Then select if you want direct connections are not. While direct connections are faster, you will limit the machines you see to ones only with open ports. Use the rest of the filters to search for GPU type, number of GPUs and other machine specifics.
Once you find a machine you like and rent it, the OS Image will start to load on it. Afterwards you will get connection information for the proxy connection only or both the proxy and direct. You will need the port number, which appears after the -p and the hostname.
Open up Putty.exe. You can then entire the hostname and port into the Putty client.
You will also need to select your private key file, by selecting SSH->Auth->Credentials on the left hand menu and then select your key file that you saved in step 1.
The final step is to save your session information. Navigate back to the session information pane, type in a name in the Saved Session box and then hit Save. Your keypath, hostname and IP address should now all be saved under that name and will be readable by WinSCP.
After saving the key it is easy to hit the Open button which will connect Putty. However once you close that session, the session information is lost. Navigate back to the Session tab and save the session before opening the connection.
Hit open to open up your SSH connection. The terminal will ask to add the key fingerprint (type yes) and then connect to the instance. You are in!
The final tool you will want to use with Windows is WinSCP.
If you saved your session information in Putty, the setup is trivial in WinSCP. It will simply import your Putty session information and then allow you to connect to that instance!
Once the session information is imported, simply hit the Login button to authenticate with the instance and then start transferring files by dragging them and dropping them between your local machine and the instance.
Let us know if you found this guide helpful and how we could improve.