- First you go to the official Visual Studios website
- then either pick mac or windows version of Visual Studios depending on your preference
- Lastly once download it should open up and look the below screenshot when opened.
- First install OpenSSh if on windows
- Look up your couse specific account here in this link https://sdacs.ucsd.edu/~icc/index.php
- Next open your terminal in VS code and paste in $ ssh course specific account + @ieng6.ucsd.edu
- Then the terminal ask to say yes or no such as the image below and in this case say yes
- You can try some commands in the terminal such as PWD which will return your current working directory *There's other commands like ls which will list files/directories in the current directory and if you were to do it for the first time it would return perl5 *You can also lest to log off by ctrl-D or run the command exit in your terminal
- First make a java file with any name, for this demonstration I will use WhereAmI.java with contents in it.
- Run the code with Javac and Java and check if it is working.
- next use the scp WhereAmI.java [email protected]:~/ where the username can be replaceable with your student username and it should prompt you a password
- Lastly log into ieng6 with ssh again, and use ls and so you should see the file there in your home directory, now you can use javac and java when logged in.
- First go to terminal and paste ssh-keygen
- Next it will ask for your key and so you paste your file
- when it ask for passphrase just press enter and it will allow you to move forward and your terminal should look like this
- Next type in mkdir .ssh and logoff
- Now you can type your public key plus your username something like this scp /Users/joe/.ssh/id_rsa.pub [email protected]:~/.ssh/authorized_keys and it will log you in
- By doing this it made me have 1 less keystroke to deal with when logging in since I didn't have to type in my password.
- Now try to do commands such as entering your username with a command such as ssh [email protected] "ls"
- or try writing commands with semicolons which will do each step like cp WhereAmI.java OtherMain.java; javac OtherMain.java; java WhereAmI
- By doing this it made me have 3 less keystrokes since I can have all my commands into one line instead of multiple
This took me about 3-5 minutes and 8 keystrokes using copy and pasting since its been a while since I last used the terminal to do so.However, given I now know what commands to use, I believe it would take me about a half a minute to copy something through SSH SCP. Assuming I would have to do this over 100 times, this would eat up about 50 minutes of working time.