forums › forums › SQLyog › SQLyog: Bugs / Feature Requests › Ssh Public / Private Key Not Working
- This topic is empty.
-
AuthorPosts
-
-
March 17, 2007 at 6:13 am #10243PeterMMember
I created a 1024 RSA key with passphrase and uploaded it to my servers .ssh/authorized_keys file
I checked “Use SSH Tunneling” on the SSH tab. filled in my info checked “Public key” button, checked “save passphrase”
selected the private key and hit test connection and I get
“SSH Error: FATAL ERROR: Network error: Connection timed out”
I get nothing in the server logs
The SSH Server is Openssh 4_2 and it is set for “Not to allow password logins”
If I change the server to allow password logins I get this message in the server logs
Code:(pam_unix) authentication failure; logname= uid=xx euid=xx tty=ssh ruser= rhost=xxx.xxx.xxx.xxx user=root
Mar 16 22:56:58 activation sshd[7620]: Failed password for XXXX from xxx.xxx.xxx.xxx port 2036 ssh2I also get a error message from SQLyog that says “SSH Error: FATAL ERROR: Unable to authenticate”
To me it looks like it is still trying to do a password login even if the public key button is checked, and when I have the ssh server set for no password logons it just times out.
The same pub / private key works perfectly in Ultraedit and Securecrt.
Also the help file instructs you to enter the path to your public key. I think it should be your private key
I am using – SQLyog Enterprise – MySQL GUI v5.25
Peter
-
March 17, 2007 at 10:45 am #23608peterlaursenParticipantQuote:To me it looks like it is still trying to do a password login even if the public key button is checked, and when I have the ssh server set for no password logons it just times out.
I log on to two different servers with password and with passphrase (each at a time of course) – and the password and passphrase are different. So authentication would fail for me when I tried public/private key authentication if you were right in this.
Give us a little time to discuss how to handle this!
Quote:Also the help file instructs you to enter the path to your public key. I think it should be your private keymy mistake actually! Will be corrected!
-
March 17, 2007 at 12:13 pm #23609peterlaursenParticipant
We can reproduce this if the text-box for the private key is left empty.
That happens because of the structure of the parameterlist for the PLINK command that SQLyog executes internally.
however you write “I.. selected the private key”
.. are you perfectly sure that the text box was not empty ??
We will make sure that PLINK/SQLyog does not try to connect with an empty string for
in the next release. We will simply validate for that before generating the connection string. There is one more issue actually. And that is that if the SSH server is not configured for PK/PK authentication then
is silently ignored on the server side and you can choose the option (and even enter a Word-file for the Private Key) if you like – SSH connects with password authentication if the 'passphrase' given is the user 'password'. Finally always check for 'orphaned' PLINKs in the task manager, when SSH behaves weird.
-
March 17, 2007 at 4:57 pm #23610PeterMMemberQuote:We can reproduce this if the text-box for the private key is left empty.Quote:That happens because of the structure of the parameterlist for the PLINK command that SQLyog executes internally.
however you write “I.. selected the private key”
.. are you perfectly sure that the text box was not empty ??
Quote:We will make sure that PLINK/SQLyog does not try to connect with an empty string forin the next release. We will simply validate for that before generating the connection string. Quote:There is one more issue actually. And that is that if the SSH server is not configured for PK/PK authentication thenis silently ignored on the server side and you can choose the option (and even enter a Word-file for the Private Key) if you like – SSH connects with password authentication if the 'passphrase' given is the user 'password'. SSHD Server Config with Not allow password login.
Code:# Package generated configuration file
# See the sshd(8) manpage for details# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 768# Logging
SyslogFacility AUTH
LogLevel INFO# Authentication:
LoginGraceTime 30
PermitRootLogin yes
StrictModes yesRSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile %h/.ssh/authorized_keys# Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes# To enable empty passwords, change to yes (NOT RECOMMENDED)
PermitEmptyPasswords no# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no# Change to no to disable tunnelled clear text passwords
#PasswordAuthentication yes# Kerberos options
#KerberosAuthentication no
#KerberosGetAFSToken no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yesX11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
KeepAlive yes
#UseLogin no#MaxStartups 10:30:60
#Banner /etc/issue.net# Allow client to pass locale environment variables
AcceptEnv LANG LC_*Subsystem sftp /usr/lib/openssh/sftp-server
UsePAM yes
IgnoreUserKnownHosts no
PasswordAuthentication no
AllowUsers root
GatewayPorts no
AllowTcpForwarding yesQuote:Finally always check for 'orphaned' PLINKs in the task manager, when SSH behaves weird.The passphrase for the ssh key IS different than the plain text password login for the user.
Thanks for looking into this.
Peter
-
March 19, 2007 at 4:34 am #23611peterlaursenParticipant
hmmm .. OpenBSD – not every day we meet this OS. There could be some special issue.
Today Monday is national holiday in India. We will not be able to work on this untill 2morrow. I think we will need to provide a build that does more logging and/or debugging. But let me discuss with the developer 2morrow morning.
-
March 19, 2007 at 5:38 am #23612peterlaursenParticipant
1) I think you are mistaken that you did not allow password login. the setting
“PasswordAuthentication no” only applies to sftp I think.
In the general setting it says
# Change to no to disable tunnelled clear text passwords
#PasswordAuthentication yes
and as every thing is commented out defults are active – and defaualt is 'yes'.
But this of course no reason why key authentication should fail!
do we agree so far?
-
March 19, 2007 at 6:33 am #23613BikasMember
Hi there,
1) We do understand that the passphrase is diffrent from the usual password and that is the reason we have given the option for the password or passphrase(according to the choice) in our SSH tab.
2) Saw your ssh config details and i used that as the configuration file for our test system and found that ssh with password was not working(which was working with the old config file). But ssh with private key was working without any problem also
with your config.
Any idea how to do progress from here?
Actually the PLINK command syntax if very simple – if there is a “i” parameter in the string then the “p” parameter is taken by SSHD as a passphrase, with no “i” parameter the “p” parameter is defining a (plain) password. We only have this option: to use “-i path_to_private_key” or not.
(written by our developer 'Bikas' who is a newbie only in respect to Forums use … and this remark was written by peter)
-
March 19, 2007 at 6:38 am #23614BikasMember
one good question is:
Are you perfectly sure that the SSH config file as you post it here is really effective?
Did you restart the computer or the SSHD daemon?
-
March 21, 2007 at 7:00 am #23615adarshMember
any news?
We would like to ensure that everything is fixed before next release.
-
March 22, 2007 at 6:52 am #23616PeterMMember
Yes I am sure that my config is working fine
below I turn the use plain text password on:
root@carnie:~# ssh xx.xxx.xxx.xx
[email protected]'s password:
As you can see it asked for my root password.
Then I changed the setting to allow only public/private keys and No plain text password
root@carnie:~# ssh xx.xxx.xxx.xx
Permission denied (publickey).
The machine I am trying to connect from does Not have the private key and can only log on via password for this test.
SecureCRT and UEStudio6 both work fine using the private / public key only(no plain test login)
Peter
-
March 22, 2007 at 6:53 am #23617PeterMMemberBikas wrote on Mar 18 2007, 11:38 PM:one good question is:
Are you perfectly sure that the SSH config file as you post it here is really effective?
Did you restart the computer or the SSHD daemon?
only restarted the sshd
-
March 22, 2007 at 8:05 am #23618BikasMember
Hi,
First of all thanks for your time and patience that you have shown to make this software a better product.
Secondly i was not able to get a clear picture of the state from you answer. Does problem still persist after restart ?
1) Is SQLyog still not able to establish a connection to you ssh server with private key and the passphrase ??
(The server that is configured for private key only)
2) Did you try our new release 5.26 ?
-
-
AuthorPosts
- You must be logged in to reply to this topic.