Skip to content

Instantly share code, notes, and snippets.

@atl
Last active February 15, 2019 16:57

Revisions

  1. atl renamed this gist Jan 13, 2013. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. atl created this gist Jan 13, 2013.
    9 changes: 9 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    This is a quick configuration upgrade that allows you to continue using ssh as you have, but with the added benefit of `ssh-agent` forwarding when logged into remote hosts, meaning no more keys on intermediate servers and the like.

    ## Requirements
    This snippet assumes that you've been using ssh, ssh keys, and authorized_keys on remote hosts.

    * `.ssh/id_dsa` and/or `.ssh/id_rsa` already exist
    * keys are authorized on the remote servers you have been using
    * you have at least a minimal working `.ssh/config` file

    4 changes: 4 additions & 0 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    # persistently add default keys to Keychain
    ssh-add -K
    # prepend ForwardAgent to existing ssh_config, meaning `ssh -A` is the effective default
    echo "ForwardAgent yes" | cat - ~/.ssh/config > /tmp/out && mv /tmp/out ~/.ssh/config