Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Launch your terminal program (e.g., PowerShell) and type the following (not including the $ and replacing the “userid” with your username) command to log in to the CS server. You will need to replace the "userid" with your username.

$ ssh userid@cslogin.arc.rhodes.edu

...

$ ssh doej-21@cslogin.arc.rhodes.edu

Info

Note that the initial dollar sign and space $ are included to indicate that the rest of the code snippet is a command meant to be entered at a prompt. In the above example you would only enter doej-21@cslogin.arc.rhodes.edu as a command.

You will be prompted for your password, which will be your regular Rhodes One Login password.

...

First off, start by creating an SSH keypair by entering the following command into a local PowerShell prompt.

Info

If you are still connected via ssh to cslogin your PowerShell prompt will begin with userid@cslogin. To end the ssh session and return you to your local PowerShell prompt enter the command $ exit. The prompt should now begin with PS C:\Users\username>.

$ ssh-keygen -t rsa -b 4096

...

PowerShell lacks the equivalent of the ssh-copy-id utility that is installed by default with SSH on Linux and MacOS. As a workaround, you can execute the following two commands from your PowerShell terminal.

Replace “userid” with your username before executing!

...

$ $cmd = "mkdir

...

-p

...

~/.ssh;

...

cat

...

|

...

tr

...

-d

...

'\r'

...

>>

...

~/.ssh/authorized_keys"

...

Replace “userid” with your username before executing the following!

$ cat ~/.ssh/id_rsa.pub

...

|

...

ssh

...

userid@cslogin.arc.rhodes.edu

...

"$cmd"

Info

...

Note that ~ is a reference to your home directory. This shell expansion works in Linux/Unix shells (like BASH and zsh) and PowerShell.

These commands are doing a lot! Here is a breakdown for the curious:

  1. it reads the first command assigns a set of commands to be run later to the local PowerShell variable $cmd

  2. the second command:

    1. uses cat to read your public key

    from a
    1. , the local file

    called
    1. id_rsa.pub

    it
    1. opens an ssh connection to the remote server cslogin

    2. | pipes the contents of id_rsa.pub through the ssh connection and sends the commands assigned to the $cmd variable to be run on the remote server.

    3. mkdir creates a new directory on the remote server called .ssh (if it

    doesn’t
    1. doesn't already exist)

    it
    1. cat | sends the piped stream of data from id_rsa.pub through the tr command which translates the line termination characters from DOS-style (

    1. "\r\

    n”
    1. n") to Unix-style (

    1. "\

    n”
    1. n")

    it
    1. >> appends the newly formatted public key into a remote file called authorized_keys

Note that ~ is a reference to your home directory. This shell expansion works in Linux/Unix shells (like BASH and zsh) and PowerShell.

Now, whenever you log in to cslogin over SSH you will be prompted for your passphrase rather than your password.

...

Now, at this point you should be all done with the required configuration on your local host. You will still need to setup more SSH keys on cslogin so that you can securely exchange files with GitHub.:

Configuring and Using Git