Skip to main content

Creating SSH Keys To Allow Password-Less File Transfers Between SiteIDs

SiteID:   A website account’s unique identifier within the OTDI Web Hosting system which may (or may not) be reflected in your site’s URL. For example, https://osu.edu is OSU’s primary URL, but osumain is their SiteID.

Open two terminals

On Terminal #1

  1. SSH into webssh.osu.edu using your Name.# and Password
  2. Choose the SiteID you wish to copy your files from. (Source)
  3. As the SiteID user:
    1. ssh-keygen
      1. This creates the ~/.ssh subdirectories
      2. Also creates a private key (Change to use filename =id_rsa)
      3. Also creates a Public Key (id_rsa.pub)
      4. Do not use a passphrase on the key
    2. cat ~/.ssh/id_rsa.pub
    3. Copy the output

On Terminal #2

  1. SSH into webssh.osu.edu using your Name.# and Password
  2. Choose the SiteID you wish to copy your files to. (Target)
    1. (Not the same as the previous site)
  3. As the SiteID user:
    1. ssh-keygen
      1. This creates the ~/.ssh subdirectories
      2. Also creates a private key (Change to use filename =id_rsa)
      3. Also creates a Public Key (id_rsa.pub)
      4. Do not use a passphrase on the key
    2. touch ~/.ssh/authorized_keys
    3. chmod 600 ~/.ssh/authorized_keys
    4. vi ~/.ssh/authorized_keys
      1. Press ‘i’ to enter ‘Insert’ mode in VI
      2. Paste the output of Item #4 on the 1st line
      3. Write & Quit the file (:wq)

Back on Terminal #1

  1. Test the Key
    1. ssh SiteID#2@webssh.osu.edu
      1. Or even better: ssh SiteID#2@localhost
  2. If both logins succeed without the need for a password, you can now SCP your files directly from one SiteID to another, without your files ever leaving our AWS Private Cloud. It’s a fast way to copy your files from -Dev to -Test.