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

Sequel Pro SSH tunnel #38

Closed
sakanaproductions opened this issue Feb 12, 2015 · 50 comments
Closed

Sequel Pro SSH tunnel #38

sakanaproductions opened this issue Feb 12, 2015 · 50 comments

Comments

@sakanaproductions
Copy link

I've started up scotch box without issue. But, when I go into sequel pro and try to get into the mysql through ssh I get the following error: "SSH connection failed, The SSH tunnel has unexpectedly closed." My connection settings are below.
Name: scotchbox
Mysql Host: 127.0.01
User: root
Password: root
SSH Host: 192.168.33.10
SSH user: vagrant
SSH password: vagrant

@theJasonJones
Copy link

I'm not sure if you have a typo, but the MySQL hostname should be
127.0.0.1

You have
127.0.01

@sakanaproductions
Copy link
Author

Yeah, it was just a typo :)


Jamie Fishback
(323)393-3474
jamie@jamiefishback.com
http://www.jamiefishback.com

This e-mail message is for the sole use of the intended recipient(s) and
may contain confidential and privileged information. Any unauthorized
review, use, disclosure or distribution is prohibited. If you are not
the intended recipient, please contact the sender by reply e-mail and
destroy all copies of the original message. Thank You.

On Mon, Feb 16, 2015 at 6:28 PM, Jason Jones notifications@github.com
wrote:

I'm not sure if you have a typo, but the MySQL hostname should be
127.0.0.1

You have
127.0.01


Reply to this email directly or view it on GitHub
#38 (comment).

@whatnickcodes
Copy link
Member

So, are we good to to close this?

@theJasonJones
Copy link

I think we're good to go.

@sakanaproductions
Copy link
Author

No, it was a typo on github not on sequel pro


Jamie Fishback
(323)393-3474
jamie@jamiefishback.com
http://www.jamiefishback.com

This e-mail message is for the sole use of the intended recipient(s) and
may contain confidential and privileged information. Any unauthorized
review, use, disclosure or distribution is prohibited. If you are not
the intended recipient, please contact the sender by reply e-mail and
destroy all copies of the original message. Thank You.

On Tue, Feb 17, 2015 at 8:07 AM, Nicholas Cerminara <
notifications@github.com> wrote:

So, are we good to to close this?


Reply to this email directly or view it on GitHub
#38 (comment).

@theJasonJones
Copy link

I see, where is the typo so I can correct it? I seem to missing it when I look over the github docs.

Here is a image of the current settings:

screen shot 2015-02-17 at 10 25 57 am

@sakanaproductions
Copy link
Author

The typo is in my bug report not in your documents.


Jamie Fishback
(323)393-3474
jamie@jamiefishback.com
http://www.jamiefishback.com

This e-mail message is for the sole use of the intended recipient(s) and
may contain confidential and privileged information. Any unauthorized
review, use, disclosure or distribution is prohibited. If you are not
the intended recipient, please contact the sender by reply e-mail and
destroy all copies of the original message. Thank You.

On Tue, Feb 17, 2015 at 8:27 AM, Jason Jones notifications@github.com
wrote:

I see, where is the typo so I can correct it? I seem to missing it when I
look over the github docs.

Here is a image of the current settings:

[image: screen shot 2015-02-17 at 10 25 57 am]
https://cloud.githubusercontent.com/assets/1423384/6232088/82b4a3c6-b68f-11e4-91ec-85f327b84f0a.png


Reply to this email directly or view it on GitHub
#38 (comment).

@floriandotpy
Copy link

I've selected the private key generated by vagrant, the connection works for me.

EDIT: user / password combination works as well.

@whatnickcodes
Copy link
Member

It could also be a network / firewall issue.

@jazzdrive3
Copy link

I'm getting this error as well. "SSH connection failed, The SSH tunnel has unexpectedly closed."

Settings are correct. I can connect to my other vagrant boxes just fine through Sequel Pro SSH forwarding.

The final two lines in the Show Details message are "RSA host key for 192.168.33.10 has changed and you have requested strict checking.
Host key verification failed."

@jazzdrive3
Copy link

Why was this closed?

@whatnickcodes whatnickcodes reopened this Mar 2, 2015
@whatnickcodes
Copy link
Member

Reopened. Are you still having problems?

@jazzdrive3
Copy link

Yeah, the same issue as the original poster. I didn't see any solution in the thread other than using the vagrant key. Which is fine, but that would warrant an update to documentation, correct? Is that the recommended solution?

If I'm understanding correctly, @sakanaproductions had a typo just in his bug report, but he actually has the correct values in Sequel Pro. I have triple checked my values as well, and host key verification is failing.

See my comment at #38 (comment)

Thanks!

@whatnickcodes
Copy link
Member

I'm going to close this, but use the key for now.

@johnstephens
Copy link

I have the same issue. Where can I find the vagrant key?

@whatnickcodes
Copy link
Member

Type: vagrant ssh-config

@johnstephens
Copy link

Thank you! This worked for me:

Name: scotchBox
MySQL Host: 127.0.0.1
Username: root
Password: root
SSH Host: 127.0.0.1
SSH User: vagrant
SSH Password: {Select vagrant_private_key file}
SSH Port: 2222

@m0lmk
Copy link

m0lmk commented Sep 20, 2015

I have this problem. I've tried using the vagrant_private_key file and it still gives the same error.

I've triple checked my settings and they are the same as the documentation.

Here is the error message

Used command: /usr/bin/ssh -v -N -o ControlMaster=no -o ExitOnForwardFailure=yes -o ConnectTimeout=10 -o NumberOfPasswordPrompts=3 -i /Users/matt/.vagrant.d/boxes/scotch-VAGRANTSLASH-box/2.0/virtualbox/vagrant_private_key -o TCPKeepAlive=no -o ServerAliveInterval=60 -o ServerAliveCountMax=1 -p 22 vagrant@192.168.33.10 -L 52259/127.0.0.1/3306

Bad local forwarding specification ' 52259/127.0.0.1/3306'

@fakingfantastic
Copy link

For anyone still having this issue, the answer might be pretty straight forward, as it was for me... once I saw the magic clue.

Host default
  HostName 127.0.0.1
  User vagrant
  Port 2222
  UserKnownHostsFile /dev/null
  StrictHostKeyChecking no
  PasswordAuthentication no
  IdentityFile [snip]
  IdentitiesOnly yes
  LogLevel FATAL

Port 2222!

Set the SSH port to 2222 in Sequel Pro, and I'm in!

Hope this helps!

@Brendonwbrown
Copy link

I had some strange formatting errors in my ssh 'known-hosts' file. Fixing these allowed me to ssh in without a problem. For those new to these issues, I recommend reading the 2.0 release announcement page here.

@whatnickcodes
Copy link
Member

Thanks @Brendonwbrown

@ablears
Copy link

ablears commented Apr 8, 2016

For me I needed to update the Sequel Pro client. This bug caused the issue:
sequelpro/sequelpro#2141

@ghernagon
Copy link

Agreed with @ablears, I was using an outdated version of SequelPro and after update, it worked like a charm.

Hope this help others.

@whalesingswee
Copy link

Thanks to @ablears, updated the SequelPro and everything is fine again.

@cballenar
Copy link

I had to use 127.0.0.1 for the SSH Host. Is this normal?

@pendashteh
Copy link

pendashteh commented Apr 15, 2017

This is what worked for me:

I had to delete the old line from known_hosts. You can safely delete the file:

rm ~/.ssh/known_hosts

Note: I ran vagrant ssh-config and it gave me port 2222 and I put it in Sequel Pro but it didn't connect. It only worked when I removed 2222.

@datajunkee
Copy link

Thank you @pendashteh , deleting the old line form known_hosts was the key for me. I'm in!

@Brendonwbrown
Copy link

Note that if you use SSH key pairs for other connections, you will be deleting all of your known hosts. I like to shorten my ssh host names, so this is not something I would want to do. The alternative is to open known_hosts in a text editor and see if any obvious issues pop out.

@iantearle
Copy link

iantearle commented Jun 19, 2017

Just got Scotch Pro and this is still happening. Within Sequel Pro (latest version etc) all I get is:

SSH connection failed!
The SSH Tunnel has unexpectedly closed.

With either password or vagrant insecure key.

EDIT
So I edited the known_hosts - I had used scotch box before (non pro) so booting another vagrant I have created two SSH keys - had to uncomment the old one (i still want to run both scotch boxes).

@avclark
Copy link

avclark commented Sep 8, 2017

I'm still having this issue. Clean Vagrant install with ScotchBox Pro 3.0. Tried with password and with SSH key and getting the same errors others have been reporting:

SSH connection failed!
The SSH Tunnel has unexpectedly closed.

Any ideas on how to fix?

@whatnickcodes
Copy link
Member

Type vagrant ssh-config

Then just use the port forwarding settings

@avclark
Copy link

avclark commented Sep 8, 2017

This is what that command spits out:

HostName 127.0.0.1
User vagrant
Port 2222
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentityFile /Users/avclark/sites/.vagrant/machines/default/virtualbox/private_key
IdentitiesOnly yes
LogLevel FATAL

And here are my Sequel Pro settings:

MySQL Host: 127.0.0.1
Username: root
Password: root
SSH Host: 127.0.0.1
SSH User: vagrant
SSH Key: {private key}
SSH Port: 2222

What should I change based on ssh-config?

@whatnickcodes
Copy link
Member

You on Mac or Windows?

@avclark
Copy link

avclark commented Sep 8, 2017

Mac

@avclark
Copy link

avclark commented Sep 8, 2017

El Cap

@whatnickcodes
Copy link
Member

Okay can you try SSH into the box first.

No sequel pro

ssh vagrant@127.0.0.1 -p 2222

@whatnickcodes
Copy link
Member

Password vagrant

@avclark
Copy link

avclark commented Sep 8, 2017

Didn't even prompt for a password. Here's what I got (same as the errors Sequel Pro gives, btw):

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:s6TtuBDr5iBjWO9atbRydfyuY8+dAz45l408mEpfc04.
Please contact your system administrator.
Add correct host key in /Users/avclark/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/avclark/.ssh/known_hosts:39
ECDSA host key for [127.0.0.1]:2222 has changed and you have requested strict checking.
Host key verification failed.

@whatnickcodes
Copy link
Member

Awesome. Getting there. Not a big deal. Just delete known_hosts

rm ~/.ssh/known_hosts

@avclark
Copy link

avclark commented Sep 8, 2017

I checked my known_hosts file, but wasn't really sure what I was looking for. It was just a bunch of SSH keys for various servers and apps that I use, like Beanstalk, Github, etc...

@whatnickcodes
Copy link
Member

I think you'd be okay deleting it and just starting over

@avclark
Copy link

avclark commented Sep 8, 2017

ok, that worked. but did i just lose connection to all my other servers/apps?

@avclark
Copy link

avclark commented Sep 8, 2017

thanks for the help, btw.

@whatnickcodes
Copy link
Member

No you should be okay. Next time you SSH you'll just have to accept the connection again.

Can you now SSH into Vagrant?

How about Sequel Pro?

@avclark
Copy link

avclark commented Sep 8, 2017

Yes to both. Cool. Thanks for the help.

@whatnickcodes
Copy link
Member

Yep, no problem!

@Brendonwbrown
Copy link

I rather not delete the entire entry since I've established a lot of known hosts in the past. I remember there being some extra lines and formatting issues, which when cleaned up, allowed Vagrant to work.

@philgyford
Copy link

philgyford commented Oct 6, 2017

I'm on a Mac and I've tried all these individually and together:

  • Removing my ~/.ssh/known_hosts file.
  • Adding the private key mentioned in vagrant ssh-config as the SSH Key.
  • Adding either 2222 or 22 as the SSH Port.

I still get "The SSH Tunnel has unexpectedly closed."

@whatnickcodes
Copy link
Member

Adding the private key mentioned in vagrant ssh-config as the SSH Key.

Don't do that

Can you try with just user/password auth:

  • vagrant
  • vagrant

@philgyford
Copy link

@whatnickcodes Sorry, yes I tried that first because it's in the documentation.

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