Skip to content

Instantly share code, notes, and snippets.

@lgloege
Last active November 2, 2023 17:04
Show Gist options
  • Save lgloege/cb88664328896b80b6992c07bf9fb0ef to your computer and use it in GitHub Desktop.
Save lgloege/cb88664328896b80b6992c07bf9fb0ef to your computer and use it in GitHub Desktop.

Revisions

  1. lgloege revised this gist Mar 12, 2018. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions rsync_from_server.md
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,9 @@
    # Setup keyless login
    1. On local make an RSA key if you haven't already (ssh-keygen)
    2. Copy that key into .ssh/authorized_keys on the first (i.e. bastion) server (ssh-copy-id [email protected])
    2b. Test that you can ssh [email protected] and connect without password
    3. ssh to first.ser er and create an RSA key on first.server if you haven't already (ssh-keygen)
    4. ssh-copy-id to the server you want to access (what I am calling second.server)
    1. On local make an RSA key if you haven't already (`ssh-keygen`)
    2. Copy that key into .ssh/authorized_keys on the first (i.e. bastion) server (`ssh-copy-id [email protected]`)
    2b. Test that you can `ssh [email protected]` and connect without password
    3. `ssh to first.server` and create an RSA key on first.server if you haven't already (`ssh-keygen`)
    4. `ssh-copy-id` to the server you want to access (what I am calling second.server)
    4b. test that you can ssh from first.server to second.server without entering a password

    # To copy from server to local
  2. lgloege created this gist Mar 12, 2018.
    13 changes: 13 additions & 0 deletions rsync_from_server.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    # Setup keyless login
    1. On local make an RSA key if you haven't already (ssh-keygen)
    2. Copy that key into .ssh/authorized_keys on the first (i.e. bastion) server (ssh-copy-id [email protected])
    2b. Test that you can ssh [email protected] and connect without password
    3. ssh to first.ser er and create an RSA key on first.server if you haven't already (ssh-keygen)
    4. ssh-copy-id to the server you want to access (what I am calling second.server)
    4b. test that you can ssh from first.server to second.server without entering a password

    # To copy from server to local
    `rsync -e "ssh [email protected] ssh" [email protected]:/path/to/file /path/to/local/dest`

    # To copy from local to server
    `rsync -e "ssh [email protected] ssh" /path/to/local/src [email protected]:/path/to/server/dest`