

That's not really a good idea, as you'd be sharing your local SSH keys with every server you SSH into. Warning: You may be tempted to use a wildcard like Host * to just apply this setting to all SSH connections. If this file doesn't exist, you can create it by entering touch ~/.ssh/config in the terminal.Įnter the following text into the file, replacing with your server's domain name or IP: Host Using your favorite text editor, open up the file at ~/.ssh/config. Let's set up SSH to allow agent forwarding to your server. > Hi username! You've successfully authenticated, but GitHub does not provide You can test that your local key works by entering ssh -T in the terminal: $ ssh -T Attempt to SSH in to github

You can use our guide on generating SSH keys if you've not done this yet. Setting up SSH agent forwardingĮnsure that your own SSH key is set up and working.
SSH CONFIG EDITOR PASSWORD
This is sort of like asking a friend to enter their password so that you can use their computer.Ĭheck out Steve Friedl's Tech Tips guide for a more detailed explanation of SSH agent forwarding. The nifty thing is, you can choose to let servers access your local ssh-agent as if they were already running on the server. It's a program that runs in the background and keeps your key loaded into memory, so that you don't need to enter your passphrase every time you need to use the key. If you've already set up an SSH key to interact with GitHub, you're probably familiar with ssh-agent. It allows you to use your local SSH keys instead of leaving keys (without passphrases!) sitting on your server. SSH agent forwarding can be used to make deploying to a server simple.
