-
Notifications
You must be signed in to change notification settings - Fork 0
2_BASICS: Accessing PaperSpace using a local terminal through SSH & common Linux commands
jamahun edited this page Jul 28, 2020
·
2 revisions
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-browser
this 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:8157
into 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 directoryName
open up directory -
cd ..
navigate to parent directory -
pwd
print working directory -
ls
list folders and files in current directory
-
exit()
cancel operation or usectrl+c
cp filename.filetype newfilename.filetype
mv filename.filetype /locationdirectorytomoveto
-
rm filename.filetype
Remove a file -
wget example.url
download a file from a URL to the working directory -
open filename.filetype
Open a file -
cat filename.filetype
Read contents of a file -
ssh IPaddress@IPaddress
secure shell -
nvidia-smi
Check graphics performance - tab: to complete filename
- upArrow: cycle through previous commands run
sudo apt-get update
sudo apt-get dist-upgrade