2_BASICS: Accessing PaperSpace using a local terminal through SSH & common Linux commands - jamahun/fakelab.studio GitHub Wiki
Install a bash emulator on your local computer. If you are using windows I recommend using cmder and for Apple users terminal.
The following procedure will allow us to use our local terminal to execute commands on our virtual machine.
- Start your PaperSpace virtual machine and copy the public IP address, if you haven't got a public IP you will need to activate it for a small fee.
- Inside your local terminal, use:
ssh paperspace@<enterpublicIP>. - Enter the password for your PaperSpace virtual machine. The PaperSpace passwords are emailed to you once you activate your virtual machine. If you are not sure what the password is check your email used to setup PaperSpace.
- Now we should be connected to the root directory of our virtual machine
Follow the steps to access Jupyter Notebooks
- In the PaperSpace terminal use
jupyter lab --no-browserthis should bring up a local host address and a token - Open up another local terminal (either cmder or terminal) and use
ssh -NL 8157:localhost:<8888> paperspace@publicIP. You will be prompted to enter your PaperSpace password, once you enter it the terminal should 'hang' meaning it will look like it is trying to execute a command. - Open up a new browser window and enter
localhost:8157into the browser address. - This should bring up Jupyter Lab where you can enter the token from the PaperSpace terminal. Now you should be able to navigate through the directories using Jupyter Lab as well as use terminals, edit code & create Jupyter Notebooks.
-
cd ~change directory back to home -
cd directoryNameopen up directory -
cd ..navigate to parent directory -
pwdprint working directory -
lslist folders and files in current directory
-
exit()cancel operation or usectrl+c cp filename.filetype newfilename.filetypemv filename.filetype /locationdirectorytomoveto-
rm filename.filetypeRemove a file -
wget example.urldownload a file from a URL to the working directory -
open filename.filetypeOpen a file -
cat filename.filetypeRead contents of a file -
ssh IPaddress@IPaddresssecure shell -
nvidia-smiCheck graphics performance - tab: to complete filename
- upArrow: cycle through previous commands run
sudo apt-get update
sudo apt-get dist-upgrade