Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSH seems broken #15

Closed
jokeyrhyme opened this issue Apr 7, 2016 · 5 comments
Closed

SSH seems broken #15

jokeyrhyme opened this issue Apr 7, 2016 · 5 comments

Comments

@jokeyrhyme
Copy link

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 git@github.com
Host key verification failed.

root@localhost:~# ssh new@sdf.org
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.

@patryk9200
Copy link

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

@jolibert
Copy link

jolibert commented Apr 7, 2016

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

@patryk9200
Copy link

@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 git@github.com
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.

@jokeyrhyme
Copy link
Author

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

@muru
Copy link

muru commented Sep 22, 2016

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants