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 connection issues in RC9 #1125

Open
xavi-dev opened this issue Jul 5, 2016 · 73 comments
Open

SSH connection issues in RC9 #1125

xavi-dev opened this issue Jul 5, 2016 · 73 comments

Comments

@xavi-dev
Copy link

@xavi-dev xavi-dev commented Jul 5, 2016

Getting this error when using ssh tunnel with password (not private key) and port 22:

Resource temporarily unavailable. No supported authentication methods found. (Error #35)

The local machine is MacOS el Capitan 10.11.5
The remote server is MacOS el Capitan 10.11.5 with Mac Server

Both SO are using OpenSSL 0.9.8zh 14 Jan 2016 version

@simsekgokhan
Copy link
Collaborator

@simsekgokhan simsekgokhan commented Jul 5, 2016

Hi Xavi, thanks for the issue reporting. We will try to reproduce and investigate the issue. Can you also provide output of the following command on local and server side?
sshd --version

@xavi-dev
Copy link
Author

@xavi-dev xavi-dev commented Jul 5, 2016

The version is OpenSSH_6.9p1, LibreSSL 2.1.8 on booth sides.

@JivanRoquet
Copy link

@JivanRoquet JivanRoquet commented Jul 7, 2016

Don't know if it's exactly the same issue, but it could be related.

Getting this error when using ssh tunnel with private key and port 22:

Resource temporarily unavailable. Authentication by key (/Users/Me/.ssh/id_rsa) failed (Error -16). (Error #35)

Local machine: OS X El Capitan 10.11.2
Remote server: DigitalOcean droplet Linux 14.04

sshd --version local output:
OpenSSH_6.9p1, LibreSSL 2.1.8

sshd --version server output:
OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.7, OpenSSL 1.0.1f 6 Jan 2014

Needless to say, connecting with ssh with the exact same parameters works perfectly within a shell.

robomongo

@simsekgokhan
Copy link
Collaborator

@simsekgokhan simsekgokhan commented Jul 12, 2016

Hi Xavi, we have tested SSH with exact OSX, *SSH and *SSL versions of your local and remote servers and it worked. We will try different configs to reproduce the issue. Meanwhile, can you reproduce the issue on your side and send us the logs; related logs will be located in /var/log/system.log ?

@simsekgokhan
Copy link
Collaborator

@simsekgokhan simsekgokhan commented Jul 12, 2016

Hi @JivanRoquet, thanks for reporting the issue and details of your environment. We will investigate the issue. Best Regards. Gokhan

@juliashibalko
Copy link
Collaborator

@juliashibalko juliashibalko commented Jul 18, 2016

@simsekgokhan
Copy link
Collaborator

@simsekgokhan simsekgokhan commented Jul 25, 2016

Hey guys, we are having no luck to reproduce the issue, but we are still trying different configs.
One suggestion came to our minds, we have an enhancement in SSH code in RC9, which might cause the issue you are experiencing; could you guys want to test if you have the same result with RC8?

@xavi-dev
Copy link
Author

@xavi-dev xavi-dev commented Aug 2, 2016

Same result on RC8 for me.

The system.log of the server shows this (nothing on my mac):

Aug 2 10:08:59 macServer sshd[17213]: Connection closed by xxx.xxx.xxx.xxx [preauth]
Aug 2 10:08:59 macServer com.apple.xpc.launchd1: Service exited with abnormal code: 255

@bacheson
Copy link

@bacheson bacheson commented Aug 9, 2016

+1 RC9 doesn't work on any of my 4 macs all running the latest OSX 10.11.6

@juliashibalko
Copy link
Collaborator

@juliashibalko juliashibalko commented Aug 9, 2016

@bacheson thank you for reporting! We're investigating this problem. So if you have some free minutes, could you please add problem details to help us with replicating:

  1. OS version of server with mongod running;
  2. If possible - please provide sshd --version information of your local and remote machines;
  3. Also if possible: reproduce the issue and provide sshd logs of your local and remote machines. It will also help us so mich in problem fixing.
    // MAC SSH logs
    /var/log/system.log
    // Linux SSH logs
    /var/log/auth.log

Thanks in advance!

@bacheson
Copy link

@bacheson bacheson commented Aug 9, 2016

mongo: 3.2

sshd: OpenSSH_6.9p1, LibreSSL 2.1.8

errors:
Aug 9 12:20:09 MacBook-Pro taskgated[163]: no application identifier provided, can't use provisioning profiles [pid=645]
Aug 9 12:20:09 MacBook-Pro taskgated[163]: no application identifier provided, can't use provisioning profiles [pid=646]

@simsekgokhan
Copy link
Collaborator

@simsekgokhan simsekgokhan commented Aug 23, 2016

Hi guys, we have made some investigation/testing in the lab but still no luck to reproduce the problem.

We have also tested some workaround solutions. At this point we will continue the investigation but we can suggest workaround solution. Please let us know if you need help with applying workaround solution.

Workaround Solution

i. Use ssh port forwarding option from MAC terminal to remote mongodb server:

// with password
ssh -L localport:mongodb_ip:port user@ssh_server_ip
ssh -L 27018:192.168.3.28:27017 user@192.168.3.28  // working example
// with private key
ssh -i /path/to/private_key.pem -L localport:mongodb_ip:port user@ssh_server_ip   
ssh -i temp/priv_key.pem -L 27018:192.168.3.48:27017 user@192.168.3.48    // working example

ii. Go to Robomongo, create connection with localhost:27018
(Note: No need to enable SSH on Robomongo, ssh tunneling is enabled and handled by MAC terminal.)

Tests in lab

// working
local   10.11.3             OpenSSH_6.9p1, LibreSSL 2.1.8
remote  ubuntu 16.04        OpenSSH_7.2p2 Ubuntu-4ubuntu1, OpenSSL 1.0.2g-fips  1 Mar 2016
// working
local   10.11.3             OpenSSH_6.9p1, LibreSSL 2.1.8 
remote  ubuntu 14.04        OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.6, OpenSSL 1.0.1f 6 Jan 2014
// working
local   10.11.5             OpenSSH_6.9p1, LibreSSL 2.1.8
remote  10.11.3             OpenSSH_6.9p1, LibreSSL 2.1.8
// working
local   10.11.5             OpenSSH_6.9p1, LibreSSL 2.1.8
remote  ubuntu 14.04        OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.6, OpenSSL 1.0.1f 6 Jan 2014


@xavi-dev
Copy link
Author

@xavi-dev xavi-dev commented Aug 23, 2016

Port fowarding works for me!

@simsekgokhan
Copy link
Collaborator

@simsekgokhan simsekgokhan commented Aug 23, 2016

Would be also very helpful to know if this problem is happening always or sometimes for everybody? We have some information that it might be related to network issues (timeouts) - Thanks.

@simsekgokhan
Copy link
Collaborator

@simsekgokhan simsekgokhan commented Aug 23, 2016

And for Robomongo SSH logs please select the connection and press "shift+enter", and share the logs with us.

@xavi-dev
Copy link
Author

@xavi-dev xavi-dev commented Aug 24, 2016

The problem is happening always. I make a gif to show you the speed of connection (hosts file edited to link xxxx.com to my server ip)

robomongo

@juliashibalko
Copy link
Collaborator

@juliashibalko juliashibalko commented Sep 20, 2016

@juliashibalko
Copy link
Collaborator

@juliashibalko juliashibalko commented Sep 22, 2016

Hi guys! It would be great and very helpful for us if you check new version of Robomongo 0.9.0-RC10 and reproduce the issue. We have updated OpenSSL library so it might solve the problem.
Thanks in advance!

@marmor7
Copy link

@marmor7 marmor7 commented Sep 22, 2016

Still the same issue on RC10.

Failed to create SSH tunnel to webtest:22.
Error:
Resource temporarily unavailable. Authentication by key (/path/to/file.pem) failed (Error -16). (Error #35)

I know it's able to access the file, as it'll complain it doesn't find the file if I put some made up path there.

@ikb42
Copy link

@ikb42 ikb42 commented Sep 23, 2016

I have this issue too.
But, only when connecting to one of my servers and not to others. The server with the problem is:

more /etc/*-release
::::::::::::::
/etc/lsb-release
::::::::::::::
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.2 LTS"
::::::::::::::
/etc/os-release
::::::::::::::
NAME="Ubuntu"
VERSION="14.04.2 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.2 LTS"
VERSION_ID="14.04"

uname -r
3.13.0-93-generic

HTH

Update - server says:

OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8, OpenSSL 1.0.1f 6 Jan 2014

@simsekgokhan
Copy link
Collaborator

@simsekgokhan simsekgokhan commented Oct 4, 2016

Update:
Finally, after many tests and tries, we have managed to reproduce the issue.

local: MAC OS X 10.11.5
remote: Ubuntu 14.04
Robomongo 0.9.0 Final

Next Actions:

  • Investigate the problem in the code.
  • Increase sshd log verbose level and check logs again.
@simsekgokhan
Copy link
Collaborator

@simsekgokhan simsekgokhan commented Oct 4, 2016

@marmor7 @ikb42
Thanks for reporting the problem. Can you share version information about your local OS, remote OS and Robomongo version please?

We have finally reproduced the problem and hopefully investigation will be faster after this moment.
And in case you did not see, you can use the workaround solution until we find a permanent fix :
#1125 (comment)

@simsekgokhan simsekgokhan self-assigned this Oct 4, 2016
@MarsZone
Copy link

@MarsZone MarsZone commented Jan 10, 2018

So 1.2beta fix the ssh private key problem.
But it still some problem there. like the close button disappeared.
bu2

@simsekgokhan
Copy link
Collaborator

@simsekgokhan simsekgokhan commented Jan 10, 2018

Hi @MarsZone thanks a lot for the feedback, very happy to see that it works.
Can you share your OS version details?

@MarsZone
Copy link

@MarsZone MarsZone commented Jan 10, 2018

@simsekgokhan Yes sure.macOS High Sierra 10.13.2

@dottodot
Copy link

@dottodot dottodot commented Jan 14, 2018

I've tried the suggestions above and Robo 3T 1.2 - Beta but still get the error

Error: Resource temporarily unavailable. Authentication by key (/.ssh/id_rsa) failed (Error -18). (Error #35)

@vasimi
Copy link

@vasimi vasimi commented Jan 18, 2018

Still the same, it just takes more time to appear. :/
snimek obrazovky 2018-01-18 v 16 22 40

@usos0k
Copy link

@usos0k usos0k commented Feb 7, 2018

@h0x91b solution works for me! I was using Amazon Linux too. Thanks a lot.

@serena-sharma
Copy link

@serena-sharma serena-sharma commented Feb 19, 2018

Beta 1.2 resolves the issue for Windows 7!

@zagatta
Copy link

@zagatta zagatta commented Apr 14, 2018

Doesnt work for me either on Mac OS 10.13.3

@highfeed
Copy link

@highfeed highfeed commented Nov 3, 2018

@simsekgokhan doesn't work for me. Mac OS 10.14.1 (18B75)

@JohannesTK
Copy link

@JohannesTK JohannesTK commented Nov 26, 2018

Doesn't work.

screenshot 2018-11-26 at 09 14 58

@jaypatel512
Copy link

@jaypatel512 jaypatel512 commented Dec 20, 2018

Doesnt work for me on Mac to Digital Ocean via private networking

@lscarneiro
Copy link

@lscarneiro lscarneiro commented Dec 20, 2018

@jaypatel512 maybe this comment of mine in a related topic could help you

@BramDecuypere
Copy link

@BramDecuypere BramDecuypere commented Feb 13, 2019

@jaypatel512 Did you get it to work? I'm also having the same issue with digital ocean! And i'm able to connect with SSH via the terminal.

@Andrew-Kovalenko
Copy link

@Andrew-Kovalenko Andrew-Kovalenko commented Jun 28, 2019

Hello @JivanRoquet
Did you solve your issue?
Because I have the same issue and don't know how to fix it

@kaymaylove
Copy link

@kaymaylove kaymaylove commented Jun 28, 2019

I'm having the same issue Resource temporarily unavailable. Authentication by key (~/.ssh/xxxx) failed (Error -16). (Error #35). Please help. I'm on version 1.2.1

@oldthreefeng
Copy link

@oldthreefeng oldthreefeng commented Jul 23, 2019

in my secure log :

Jul 23 09:45:34 yunwei sshd[32595]: error: kex protocol error: type 30 seq 1 [preauth]
Jul 23 09:45:34 yunwei sshd[32595]: Connection closed by xxx.xxx.xxx.xxx port 50783 [preauth]

i found this way to resolve, @daviesalex ,but restart failed

# Add this to /etc/ssh/sshd_config
KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1
# systemctl restart sshd

my os version: CentOS Linux release 7.6.1810 (Core)
kernel: 3.10.0-327.el7.x86_64

 journalctl -xe -u sshd
Jul 23 09:57:46 yunwei sshd[771]: /etc/ssh/sshd_config line 155: Directive 'KexAlgorithms' is not allowed within a Match block
Jul 23 09:57:46 yunwei systemd[1]: sshd.service: main process exited, code=exited, status=255/n/a
Jul 23 09:57:46 yunwei systemd[1]: Failed to start OpenSSH server daemon.

confused me

@ccostafari
Copy link

@ccostafari ccostafari commented Nov 6, 2019

This is still happening, having the same exact error.

@lynx-r
Copy link

@lynx-r lynx-r commented Nov 8, 2019

This comment helped me #1189 (comment)

@shivarajnaidu
Copy link

@shivarajnaidu shivarajnaidu commented Jun 8, 2020

I am getting this error
image

@benneq
Copy link

@benneq benneq commented Jul 17, 2020

I'm getting this error, too on macOS Catalina. It did work 2 months ago. I'm not sure if some macOS or MongoDB Update caused this issue. I'm using SSH with password.
I already deleted the .3T folder and reinstalled Robo 3T. Still the same issue:

Error:
Resource temporarily unavailable. Error when starting up SSH session: -8
. (Error #35)
@h0rn3t
Copy link

@h0rn3t h0rn3t commented Jul 21, 2020

same in catalina

Resource temporarily unavailable. Authentication by key ~~~~~. failed (Error -16). (Error # 35 )

@crossinghoods
Copy link

@crossinghoods crossinghoods commented Aug 2, 2020

+1 on this issue

@7freaks-otte
Copy link

@7freaks-otte 7freaks-otte commented Aug 5, 2020

I have the same problem with Robo 3T 1.3.1 on macOS Catalina trying to connect to Ubuntu 20.04.

Error: Resource temporarily unavailable. Error when starting up SSH session: -8. (Error #35)

I tried all suggested solutions here and in #1189 (deleting old ~./config/... folder, reencoding my private id_rsa to id_rsa.pem, trying to connect with password only) with no positive result.

Studio 3T can connect, I can manually connect via SSH and Robo 3T is able to connect to all my other servers. While monitoring /var/log/syslog I realised that Robo 3T can't even establish a SSH connection, so I was wondering if something has changed with sshd on my new Ubuntu machine.

Some people suggest it could even be MTU problems, but as I don't have any time to dig further all the possible topics, I ended up manually establishing the Tunnel and connecting Robo 3T to my macOS localhost:27018 using the password:

ssh user@myserver.com -N -L 27018:localhost:27017

Or with key:

ssh user@myserver.com -i ~/.ssh/id_rsa -N -L 27018:localhost:27017

Note: I left out the -f background option because I want to be able to close the Tunnel via Ctrl+C.

I hope to see this issue fixed soon as I really prefer Robo 3T over Studio 3T and Mongo Compass for the few fast DB checks I have to do.

@shivarajnaidu
Copy link

@shivarajnaidu shivarajnaidu commented Aug 12, 2020

This works.. What about the permanent solution ? is it something need to be fixed in robo3t ?

@simsekgokhan
Copy link
Collaborator

@simsekgokhan simsekgokhan commented Sep 4, 2020

Hi all, on Windows & macOS, we have upgraded our SSH library to the latest version (libssh2 v1.9.0 - Jun/2019) and it now supports ECDSA and Ed25519 keys. Also during development, we saw that the upgrade fixed some problematic cases.
I hope Robo 3T 1.4 will fix some of your problems -> Robo 3T 1.4

Please also see: #1189 (comment) and #1590 (comment)

@aquatic7
Copy link

@aquatic7 aquatic7 commented Jan 26, 2021

Still an issue: #1816

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Robo 3T 1.2
Ready-For-Testing
Robo 3T 1.2 - Beta Testing
SSH failure (Resources temporarily un...
Linked pull requests

Successfully merging a pull request may close this issue.

None yet