Giter VIP home page Giter VIP logo

ssh-agent's Introduction

ssh-agent

A shell script that autoloads the ssh-agent and keys into each terminal session of a workstation, significantly reducing the complexity of using ssh-agent.

Used and tested on Mac OS X, FreeBSD, and Linux computers. Should work on any UNIXy host with OpenSSH installed.

INSTALL

1. Install to $HOME/.ssh directory as agent.sh

curl -L -o ~/.ssh/agent.sh https://github.com/msimerson/ssh-agent/raw/master/agent.sh
chmod 755 ~/.ssh/agent.sh

2. Run it when new terminal windows open

bash

echo 'source .ssh/agent.sh' >> ~/.bash\_profile

zsh

echo '.ssh/agent.sh' >> ~/.zprofile

3. Open new terminal/shell sessions

4. Enjoy

SSH-AGENT SOCKET

Setting _sockfile is an efficiency improvement. Rather than storing the ssh socket file in /tmp/ssh-XXXXXXXXXX/agent. and having to glob to find it, we can store it in a fixed location so this script can find it more efficiently. Since all our shell/terminal windows will share the first ssh-agent process, there is no need for the random location.

If you decide to alter the location, keep security in mind. You do not want others to have access to this socket. Your ~/.ssh directory is a great choice because its default permissions (600) are readable only by you.

If you wish to keep the default /tmp behavior, comment out the _sockfile setting.

ssh-agent's People

Contributors

arstercz avatar msimerson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ssh-agent's Issues

script requires additional configuration with MacOS 10.12

FYI: OS X 10.12 (Sierra) changed the way it uses SSL and the OS X keychain, which includes SSH, and seems to have broken this script. I can confirm that it was working perfectly until OS X 10.12. Now, your key is still loaded initially via this script, but the agent does not pass the loaded key and pass phrase along to remote systems, which makes the agent somewhat useless.

Some discussion about this here, including links to other issues and possible solutions: lionheart/openradar-mirror#15361

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.