14

How to enable SSH Forwarding on Mac OS X Snow Leopard

 3 years ago
source link: https://www.devroom.io/2010/07/29/how-to-enable-ssh-forwarding-on-mac-os-x-snow-leopard/?utm_campaign=Feed%3A+ariejan+%28ariejan%7Cdevroom.io%29
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

How to enable SSH Forwarding on Mac OS X Snow Leopard

Posted: 2010-07-29 - Last updated: 2019-06-05

Tagged apple osx mac ssh forwarding rubber ssh-agent ssh-add snowleopard

The other day I was toying with Rubber to deploy a Rails3 app to Amazon EC2. I host the project code in a private Github repository, accessible only with my own SSH key.

In order to checkout your code an any EC2 instance you can do one of two things:

  1. Copy your private SSH key to the instance - This sounds easy enough, but has serious security implications. You do not want to be sending out your private SSH key, do you? That leaves you with option 2.

  2. Let SSH forward the authentication request to your local machine. This is call Forwarding and requires ssh-agent to be running on your system. You’re in luck, ssh-agent is started automatically on your mac.

Now, the problem is that in Leopard (10.5) SSH Forwarding was enabled by default. You guessed it, in Snow Leopard it has been disabled by default. So, it’s up to you to enable SSH Forwarding manually. Here goes:

  1. Open Terminal.app.
  2. sudo vi /etc/ssh_config
    You will be asked for your password now. Feel free to use your preferred editor here.
  3. Add the following two lines to the top of the file:
    Host *
    ForwardAgent yes
  4. Save the file and exit your editor.

All right sparky, you now have enabled SSH Forwarding. Have fun!

PS. If you have enabled “Remote Login” under Sharing Preferences, make sure to stop and start that service to notify it of the changes you just made.

My site is free of ads and trackers. I record privacy-respecting usage statistics with Fathom.

Was this post helpful to you? Why not ☕ Buy me a coffee

Copyright © 1999-2020 Ariejan de Vroom <[email protected]>

Live now; make now always the most precious time. Now will never come again.
    – Jean-Luc Picard


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK