Connection dialog text fields allow multi-line input #2269

Closed
rk opened this Issue Oct 5, 2015 · 11 comments

Projects

None yet

2 participants

@rk
rk commented Oct 5, 2015

I'm trying to SSH into a CentOS 6.8 server with a limited access account—that I'm currently logged into in iTerm2. So I know the credentials work, and I know SSH can connect. When I tell Sequel Pro to connect the log looks like this:

Used command:  /usr/bin/ssh -v -N -S none -o ControlMaster=no -o ExitOnForwardFailure=yes -o ConnectTimeout=10 -o NumberOfPasswordPrompts=3 -o TCPKeepAlive=no -o ServerAliveInterval=60 -o ServerAliveCountMax=1 [user]@[127.0.0.1]
[127.0.0.1] -L 50759:127.0.0.1:3306

OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /Users/[me]/.ssh/config
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: /etc/ssh_config line 53: Applying options for *
debug1: Control socket " none" does not exist
ssh: Could not resolve hostname [127.0.0.1]
[127.0.0.1]: nodename nor servname provided, or not known

(Note: I have omitted the actual usernames and ip addresses on purpose and put placeholders in.)

I've tried: using an access domain/alias, using a root account, etc. I'm not sure what else I should do to troubleshoot.

@dmoagx
Collaborator
dmoagx commented Oct 5, 2015

Paste the used command into Terminal and see if it works there.

@dmoagx dmoagx added the WaitingOnUser label Oct 5, 2015
@rk
rk commented Oct 5, 2015

The following was output, but I never dropped into a usable prompt. (Then again, I'm not certain if I should've given the parameters.)

$ /usr/bin/ssh -v -N -S none -o ControlMaster=no -o ExitOnForwardFailure=yes -o ConnectTimeout=10 -o NumberOfPasswordPrompts=3 -o TCPKeepAlive=no -o ServerAliveInterval=60 -o ServerAliveCountMax=1 (user)@(ip-address)
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /Users/(me)/.ssh/config
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: /etc/ssh_config line 53: Applying options for *
debug1: Connecting to (ip-address) [(ip-address)] port 22.
debug1: fd 3 clearing O_NONBLOCK
debug1: Connection established.
debug1: identity file /Users/(me)/.ssh/id_rsa type 1
debug1: identity file /Users/(me)/.ssh/id_rsa-cert type -1
debug1: identity file /Users/(me)/.ssh/id_dsa type -1
debug1: identity file /Users/(me)/.ssh/id_dsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.2
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH_5*
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA 1b:08:15:28:bb:47:c4:3f:9a:17:37:7d:e5:0e:da:e6
debug1: Host '(ip-address)' is known and matches the RSA host key.
debug1: Found key in /Users/(me)/.ssh/known_hosts:91
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/(me)/.ssh/id_rsa
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Trying private key: /Users/(me)/.ssh/id_dsa
debug1: Next authentication method: password
(user)@(ip-address)'s password:
debug1: Authentication succeeded (password).
Authenticated to (ip-address) ([(ip-address)]:22).
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
@dmoagx
Collaborator
dmoagx commented Oct 5, 2015

but I never dropped into a usable prompt.

Yes, that is what -N is for. Sequel Pro doesn't need a shell so it disables it.

It sounds a bit silly that SSH would work from Terminal but not from Sequel Pro.
Do you have any personal firewall software installed?
Also try a reboot.

@rk
rk commented Oct 5, 2015

No, I don't have a personal firewall installed. I'm using the default firewall with OS X. I'll have to try a reboot later, as priorities switched.

The irony is, all the other favorites I've got (~12) that use SSH all work fine—except this newest one.

@rk
rk commented Oct 6, 2015

Well, it's a new day and I tried again with the same result. Edit: I just realized that you might not infer from that that I rebooted my machine; I cold booted it this morning.

@dmoagx
Collaborator
dmoagx commented Oct 6, 2015

The time you manually run SSH is missing the -L part. Did you leave that out?

@rk
rk commented Oct 6, 2015

No, that was because I copy/pasted and there was a return between the command I "used" and the missing part. So I copied it all and put it into one command and got:

$ /usr/bin/ssh -v -N -S none -o ControlMaster=no -o ExitOnForwardFailure=yes -o ConnectTimeout=10 -o NumberOfPasswordPrompts=3 -o TCPKeepAlive=no -o ServerAliveInterval=60 -o ServerAliveCountMax=1 (user)@(ip-address) (ip-address) -L 52244:127.0.0.1:3306
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /Users/(me)/.ssh/config
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: /etc/ssh_config line 53: Applying options for *
debug1: Connecting to (ip-address) [(ip-address)] port 22.
debug1: fd 3 clearing O_NONBLOCK
debug1: Connection established.
debug1: identity file /Users/(me)/.ssh/id_rsa type 1
debug1: identity file /Users/(me)/.ssh/id_rsa-cert type -1
debug1: identity file /Users/(me)/.ssh/id_dsa type -1
debug1: identity file /Users/(me)/.ssh/id_dsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.2
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH_5*
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA 1b:08:15:28:bb:47:c4:3f:9a:17:37:7d:e5:0e:da:e6
debug1: Host '(ip-address)' is known and matches the RSA host key.
debug1: Found key in /Users/(me)/.ssh/known_hosts:91
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/(me)/.ssh/id_rsa
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Trying private key: /Users/(me)/.ssh/id_dsa
debug1: Next authentication method: password
(user)@(ip-address)'s password:
debug1: Authentication succeeded (password).
Authenticated to (ip-address) ([(ip-address)]:22).
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.

Looks like it still got to a useable session.

@dmoagx
Collaborator
dmoagx commented Oct 6, 2015

I think I see what's going on...
Please go to Sequel Pro, put the cursor in the SSH Host input field, press cmd+A and then copy & paste the selection into TextEdit and see what you get.

@rk
rk commented Oct 6, 2015

Interesting; I get the IP address twice, on two lines. I wonder how that happened, because when I first had the problem I thought I deleted the SSH host and reentered the IP address!

That fixed the issue.

I wonder if there's a way to prevent a field like that from accepting line-breaks?

@dmoagx
Collaborator
dmoagx commented Oct 6, 2015

I wonder if there's a way to prevent a field like that from accepting line-breaks?

Yes there is, but we (probably) forgot to enable it.

@dmoagx dmoagx added Bug Component-UI and removed WaitingOnUser labels Oct 6, 2015
@dmoagx dmoagx changed the title from [1.1] Could not resolve hostname for IP address? to Connection dialog text fields allow multi-line input Oct 6, 2015
@dmoagx dmoagx referenced this issue Oct 8, 2015
Closed

Input fields bug #2278

@dmoagx dmoagx added this to the 1.1.1 milestone Oct 30, 2015
@dmoagx
Collaborator
dmoagx commented Feb 20, 2016
@dmoagx dmoagx closed this Feb 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment