Skip to content

Instantly share code, notes, and snippets.

@GaPhil
Last active October 11, 2017 20:27
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GaPhil/781afea6a53ce7e074b4a885810d928f to your computer and use it in GitHub Desktop.
Save GaPhil/781afea6a53ce7e074b4a885810d928f to your computer and use it in GitHub Desktop.
ssh and afs

Get files from local machine onto server

start off by copying your local files to a remote machine using scp. You can choose one of the servers here

general command: scp <file_name_with_path> <kth_username>@<host>:<path_on_host>
example command: scp <file_name_with_path> bobsmith@avril.sys.ict.kth.se:~/Desktop/engineering-skills

now to check that your files are on the server by connecting via ssh

general command: ssh <kth_username>@<host>
example command: ssh bobsmith@avril.sys.ict.kth.se

navigate to the correct location on the remote to find that the files are there

if you have created a jar file you can run this on the server using the usual java -jar <file_name>

Give RR permissions to see your source code on AFS

connect to the server via ssh as above

navigate to the home directory with cd

to set permissions in the working directory: fs sa . <username> <perms> in the home directory and all directories down to where your code is you want to set l (lookup (l) : list the contents of a directory) permissions so the command would be fs sa . rron l you can verify that changes have been made by list the permissions in the current directory: fs la

then you will need to give read and list permissions to rron in the directory where your code is located. (read (r) : read file content and query file status) do this by: fs sa . rron rl again verify that you have given the correct permissions: fs la

// Phillip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment