WSL icon indicating copy to clipboard operation
WSL copied to clipboard

SSH seems broken

Open jokeyrhyme opened this issue 10 years ago • 5 comments

SSH doesn't seem to work, which is stopping me from using git in Ubuntu on WSL.

Windows Insider Preview build 14316.rs1_release.160402-2217

root@localhost:~# uname -a
Linux localhost 3.4.0+ #1 PREEMPT Thu Aug 1 17:06:05 CST 2013 x86_64 x86_64 x86_64 GNU/Linux

root@localhost:~# ssh -V
OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.6, OpenSSL 1.0.1f 6 Jan 2014

root@localhost:~# ssh [email protected]
Host key verification failed.

root@localhost:~# ssh [email protected]
Host key verification failed.

root@localhost:~# ssh-keyscan -t rsa github.com
# github.com SSH-2.0-libssh-0.7.0
Segmentation fault (core dumped)

root@localhost:~# ssh-keyscan -t rsa sdf.org
# sdf.org SSH-2.0-OpenSSH_7.1
Segmentation fault (core dumped)

Update: seems to be working for me now for some reason.

jokeyrhyme avatar Apr 07 '16 07:04 jokeyrhyme

For me SSH works fine. I logged in to my other linux machine in my LAN network.

I sucesfully logged in using: ssh IP_ADDRESS -l USER_NAME

patryk9200 avatar Apr 07 '16 10:04 patryk9200

@patryk9200 thats more a problem of handling public keys if I may

jolibert avatar Apr 07 '16 13:04 jolibert

@jolibert Yes I know that, but I think that title is a little misleading. Problem is with keys, not with SSH. For me it returns:

root@localhost:~# ssh [email protected]
The authenticity of host 'github.com (192.30.252.120)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Warning: Permanently added 'github.com,192.30.252.120' (RSA) to the list of known hosts.
Permission denied (publickey).

Looks ok. Try running that command as root. Look hee: https://github.com/markomarkovic/simple-php-git-deploy/issues/65

@jokeyrhyme What You have in:

cat /root/.ssh/known_hosts ?

Try:

ssh-keygen -f "/root/.ssh/known_hosts" -R github.com Maybe it will help.

Do you have properly configured git?

I used ssh all day successfully without any problems.

patryk9200 avatar Apr 07 '16 14:04 patryk9200

I didn't even have an /root/.ssh/known_hosts file. The commands were failing before it even asked me to "Permanently added 'github.com,...' (RSA) to the list of known hosts".

However, trying all of this again today: it's all working. I have no idea what the difference is. I've not changed anything that I know of. /shrug

jokeyrhyme avatar Apr 07 '16 21:04 jokeyrhyme

In my case, I could not SSH in a sudo session. I'd switched to a non-root user using sudo -iu <user>, and SSH would fail with this error. If I used login <user> instead to switch users, SSH works fine. (SSH as the default root user always works fine.)

muru avatar Sep 22 '16 20:09 muru