Skip to main content
107 votes

How to tell git which private key to use?

If you need to connect to the same host with different keys then you can achieve it by: Configure the ~/.ssh/config with different Hosts but same HostNames. Clone your repo using the appropriate host....
nyxz's user avatar
  • 1,173
39 votes

Keep GnuPG credentials cached for entire user session

For Windows The file you need to edit should be placed at: ~\.gnupg\ If you run that in a PowerShell window it will open: C:\Users\<UserName>\.gnupg Just put the gpg-agent.conf file there with ...
CubanX's user avatar
  • 511
39 votes
Accepted

Why is the SSH server asking for a password even if I specify a valid key?

Your new (9.3) client disables ssh-rsa for RSA key(s) — because that method is now considered unsafe; it enables only the newer and better rsa-sha2-* methods —BUT your ancient (OpenSSH 6.6) server ...
dave_thompson_085's user avatar
26 votes

How to tell git which private key to use?

This is my setup for multiple accounts, each using separate rsa key. It doesn't matter whether it's github, bitbucket, or whatever; this setup is not touching ssh client config, neither it uses hosts ...
Dmytro Buryak's user avatar
20 votes

Keep GnuPG credentials cached for entire user session

Make sure to reload your gpg agent with gpg-connect-agent reloadagent /bye after changing the config.
SuperSandro2000's user avatar
19 votes

How do I configure SSH so it doesn't try all the identity files automatically?

Use IdentityFile but Keep Using ssh-agent to Avoid Passphrase Reprompts The accepted solution of using IdentitiesOnly yes means you'll never be able to take advantage of ssh-agent, resulting in ...
AndrewD's user avatar
  • 493
17 votes
Accepted

How do I send a digest auth request using curl?

You don't have to specify all those values anywhere. The only thing you do have to is username/password pair. CURL takes care of computing the client response for you. This is exactly what "...
mina nageh's user avatar
15 votes

Mirroring a web site behind a login form

I've done this successfully with WinHTTrack. You can follow the normal procedure for capturing a website, with two minor settings tweaks: In Chrome, open Dev Tools, then login to the website you need ...
Simon E.'s user avatar
  • 4,174
15 votes

How to delete specific HTTP authentication credentials from Safari (for Windows)?

If you are on Mac OS X and you are wondering how to remove a basic-authentication credential from a website, you won't find the password in Safari preferences. The answer is in the Keychain Access ...
Konchog's user avatar
  • 250
11 votes

How to tell git which private key to use?

So I set the GIT_SSH env variable to $HOME/bin/git-ssh. In order to support having my repo configuration dictate which ssh identity to use, my ~/bin/git-ssh file is this: #!/bin/sh ssh -i $(git ...
Brendan Baldwin's user avatar
9 votes

How do I configure SSH so it doesn't try all the identity files automatically?

The ssh client and the ssh-agent is communicating through a Unix domain socket whose name is specified to the client by the SSH_AUTH_SOCK environment variable (set by the agent upon its startup). ...
mikini's user avatar
  • 159
9 votes

How do I configure SSH so it doesn't try all the identity files automatically?

add this at the end of ~/.ssh/config file to prevent use keys for non config servers: Host * IdentitiesOnly=yes
Maxim Akristiniy's user avatar
9 votes
Accepted

SSH Agent Forwarding not working even when using `ssh -A`

I've been trying to troubleshoot this problem for nearly seven years, and finally it get solved -- I launch keychain in my ~/.profile, which starts its own 'ssh-agent', even on machine B & C. This ...
xpt's user avatar
  • 8,951
9 votes

How do I log out with HTTP Basic?

For chrome browser you can restart the chrome application completely by typing in the address bar. chrome://restart Another way is that, always open the browser in incognito mode. For chrome the ...
NIKHIL C M's user avatar
9 votes
Accepted

Do I need to keep the comment at the end when I copy SSH public keys to another machine?

Header yes, comment - up to you; The header tells of the encryption used, and while it maybe possible to figure it out, it's easier this way ;) As for the comment at the end, you can keep it, get ...
djsmiley2kStaysInside's user avatar
9 votes

Why do we need `required` when we have `requisite` in `PAM`?

Differentiating between required and requisite gives additional flexibility in PAM configuration. As you note, once the authentication is known to fail, in many cases there is no point in continuing ...
swoot's user avatar
  • 91
9 votes

'Server refused our key' upon attempted connection to Windows Server

I had the same issue. In short, this resulted from two separate "misconfigurations" from my side. You need to use the "administrators_authorized_keys" in the case of an admin user....
nadavge's user avatar
  • 191
8 votes

How to tell git which private key to use?

I had a client that needed a separate github account. So I needed to use a separate key just for this one project. My solution was to add this to my .zshrc / .bashrc: alias infogit="GIT_SSH_COMMAND=...
Michael Cole's user avatar
8 votes
Accepted

How to reset or change the Git user IntelliJ is authenticating with?

On Windows 10: Remove or update the Credentials stored in Windows Credentials at Control Panel\All Control Panel Items\Credential Manager.
XLordalX's user avatar
  • 196
8 votes
Accepted

How does SFTP key based authentication work? Difference between SSH and SFTP keys

There is no such thing as "SFTP key authentication", nor is there an "SFTP key" at all. SFTP always uses standard SSH as the transport – the differences only begin after you've suc­...
grawity_u1686's user avatar
7 votes

'Server refused our key' upon attempted connection to Windows Server

I think I'm facing the same problem... Any luck since then? Have you found the reason/solution? EDIT: OK, I found the cause of the issue on my side... It could be the same for you too, Chris, if you'...
Chris's user avatar
  • 109
6 votes
Accepted

How do applications remember authentication for sometime?

Having a program "remember" something is easy: write it to a file somewhere, then read it back later. That's how all settings/preferences work. (For that matter, it's how regular files work.) (They ...
grawity_u1686's user avatar
6 votes
Accepted

SSH key or user restricted to only making a SOCKS proxy

The OpenSSH ssh client can do two types of forwarding, through the -L and -D options. These two types of forwarding work differently in the client, but they use the same SSH protocol features and the ...
Kenster's user avatar
  • 8,291
6 votes

SourceTree keeps asking for Microsoft password

Finally I found it. I answer myself: Clicking the Menu Tools | Process Viewer... opens a separate window which displays the activity log. Leaving this window open for 10 or 15 minutes, you can see ...
Xavi Montero's user avatar
6 votes
Accepted

What is the criteria on which Chrome shows available certificates for client authentication

A HTTPS client certificate always have to have a corresponding private key, otherwise it can't be used for HTTPS client authentication. On Windows (the screen shot looks like it had been taken on ...
Robert's user avatar
  • 7,917
5 votes
Accepted

Windows Hello PIN/Fingerprint "This option is currently unavailable"

I had the same problem, here is what worked for me: Found a solution finally at the following location: https://social.technet.microsoft.com/Forums/en-US/84a0bd50-1360-4a94-bfb3-b049ecace521/pin-and-...
Miguel's user avatar
  • 66
4 votes

How to tell git which private key to use?

I build on @shellholic and this SO thread with a few teaks. I use GitHub as an example and assume that you have a private key in ~/.ssh/github (otherwise, see this SO thread) and that you added the ...
emonigma's user avatar
  • 2,039
4 votes

Keep GnuPG credentials cached for entire user session

Since your problem is you need more or unlimited cache time for passphrase, then you can use gpg-preset-passphrase to cache your gpg password, and you will have unlimited cache time until the agent is ...
MaXi32's user avatar
  • 198
4 votes

How to tell ssh not to check authenticity of the connection host?

I know this is an old question but i was looking for an answer to this to. So for any future googlers, here is what i found. ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no user@host ...
SoysauceShow's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible