I'm having trouble adding the ssh key due to the bad address ssh looks for the keys. And I have no clue where to effectively change it

This question is in reference to Atlassian Documentation: Set up SSH for Git

I got a host of troubles with the SSH key on a Windows 10 laptop, using Git Bash 64 bit. First:

Step 1.1: There is no Open SSH first line when I run ssh -v. Does this mean something?
Step 1.1: "If you don't have ssh installed, install it now with your package manager." What does this mean, exactly? What is a package manager? Why should I? I never needed to do this before.

Here's what I think "the root of my problem":

Step 2.2: ssh-keygen

It will show me this:

Generating public/private rsa key pair.
Enter file in which to save the key (/home/robertt/.ssh/id_rsa):

Unacceptable, Windows cannot write to that address, it makes absolutely no sense. How can I change this?

All the further troubles stem from this step alone. The problem is that ssh looks in the /home/robertt/.ssh/id_rsa, when it should look into /c/users/robertt/.ssh/id_rsa. I have no idea what variable or configuration controls this.

All my other computers show the right address and I had no trouble following the steps of the guide. But now, on this laptop, even if I mention custom addresses, I'll eventually fail at Step 5.8. And when the ssh-agent initalizes, I'm never asked of the passphrase

I'm failing on Step 5.8 like so:

ssh -Tv git@bitbucket.org will show the following:

OpenSSH_7.1p2, OpenSSL 1.0.2g 1 Mar 2016

debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to bitbucket.org [] port 22.
debug1: Connection established.
Could not create directory '/home/robertt/.ssh'.
debug1: key_load_public: No such file or directory
debug1: identity file /home/robertt/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/robertt/.ssh/id_dsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.4
debug1: match: OpenSSH_6.4 pat OpenSSH* compat 0x04000000
debug1: Authenticating to bitbucket.org:22 as 'git'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr umac-64-etm@openssh.com none
debug1: kex: client->server aes128-ctr umac-64-etm@openssh.com none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ssh-rsa SHA256:zzXQOXSRBEiUtuE8AikJYKwbHaxvSc0ojez9YXaG p1A
The authenticity of host 'bitbucket.org (' can't be established.
RSA key fingerprint is SHA256:zzXQOXSRBEiUtuE8AikJYKwbHaxvSc0ojez9YXaGp1A.
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/home/robertt/.ssh/known_host s).
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /home/robertt/.ssh/id_dsa
debug1: No more authentication methods to try.
Permission denied (publickey).

From where does it pick this /home/robertt/.ssh/ address??

I appreciate anything info that can help me here. Thank you!

1 answer

on WIndows, "home" is usually c:\Users\{username}

from a command window, try echo %HOMEPATH% to see what is set


Suggest an answer

Log in or Sign up to answer
Community showcase
Published yesterday in Statuspage

194 years of downtime: looking back on incident data from 2018

Statuspage customers logged more than 194 years of collective incidents in 2018. That’s a whopping 87% increase from the  104 years logged in 2017 , and we aren’t even through December yet....

36 views 1 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you