Jump to content


Photo

Cannot Connect Via Ssh To Windows Server


  • Please log in to reply
15 replies to this topic

#1 paulohm1

paulohm1

    Member

  • Members
  • PipPip
  • 13 posts

Posted 17 February 2012 - 06:48 PM

MONYog is installed on a Windows Server 2003. The SSH Host server is Windows Server 2008 R2. I am able to connect using putty from the Monyog server to the SSH host with no issues. However, when attempting to Test the connection through Monyog, I get the popup saying "Failed to connect to SFTP:" but there is no additional description after this.

I tried using the key in ppk format as well as openssh format, but neither seems to work.

My Monyog log file shows this:

[4.81] [2012-02-17 13:46:39] [Server: XXX] src\ysshsession.cpp(154) ErrCode:-1 ErrMsg:Unable to create Key file from buffer
[4.81] [2012-02-17 13:46:39] [Server: XXX] connectionmgr.cpp(2158) ErrCode:-1 ErrMsg:

What does this error mean?

#2 peterlaursen

peterlaursen

    Advanced Member

  • Admin
  • PipPipPip
  • 7,868 posts
  • Gender:Male
  • Location:Skagen, Denmark
  • Interests:well ... jazz/folk music, photography, chess, nature, ecology, history, bicycling, Highland Malts ... well, Lowland Malts and Cognac too actually :-) just wonder how I get the time to touch a computer! SQLyog and MONyog? no that's not interest, that's BASIC NEEDS simply!

Posted 18 February 2012 - 08:59 AM

Please tell:

1) What is the SSH sofware/service you have installed on the 2008 machine. Is it Cygwin or something else ('Tunnellier' or whatever) ? You may need to configure SFTP options here.

2) Since the error is SFTP related you you try a common GUI SFTP client, such as Filezilla or WinSCP? I think they will not be able to connect for either?

3) maybe you could also try to allow SSH with simple password authentication (no keys) just to check if it is related to this.

But I would try 2) first. If Filezilla etc. cannot connect either, the problem probably is that SFTP is not configured in in the SSHD configuration.




I cannot detail the error message. I am not well-versed in the internals of the SSH library we use. So the reply to this will ahve to wait till Monday, I'm afraid.

And with MONyog you shall use keys in OpenSSH format, BTW.


Computers make your grey hair come off ....

Peter Laursen
Webyog

#3 paulohm1

paulohm1

    Member

  • Members
  • PipPip
  • 13 posts

Posted 18 February 2012 - 01:08 PM

I have tried WinSCP and am able to connect OK.

The SSH server software on the 2008 machine is copSSH, which is a packaging of cygwin.

I will not be able to try password-only authentication until monday, however.

Please let me know if there is anything else I can try.

#4 Mahesh

Mahesh

    Advanced Member

  • Admin
  • PipPipPip
  • 491 posts
  • Gender:Male
  • Location:Bangalore,India
  • Interests:MySQL, Cricket, Music..

Posted 21 February 2012 - 04:05 AM

We are using CopSSH on Windows 7 and able to connect successfully.
You need to "Activate a user" --> Select a User from dropdown menu (Lists all windows users associated for this machine) and uncheck an option called
"Create keys for public authentication" --> Click on Next (see attached screenshot)
Now SSH user is activated.

Now, In MONyog Register/Edit Server --> Give SSH details username and password should match with Windows authentication and Click on
"Test Connection", What does this return ?

Attached Files



#5 paulohm1

paulohm1

    Member

  • Members
  • PipPip
  • 13 posts

Posted 21 February 2012 - 04:54 PM

Give SSH details username and password should match with Windows authentication


I am using Public/Private key pair with CopSSH (not password authentication). When I select "key" in Monyog, I do not have an option for password. I enter my 'username' and 'passphrase' and this is when I get the error "Failed to connect to SFTP:" without any details as described above.

#6 Mahesh

Mahesh

    Advanced Member

  • Admin
  • PipPipPip
  • 491 posts
  • Gender:Male
  • Location:Bangalore,India
  • Interests:MySQL, Cricket, Music..

Posted 22 February 2012 - 04:56 AM

You have to select Key based authentication in MONyog as well.
Please see these screen shot attached here with, Which will help you in using Key based authentication.

First you have to copy-paste content of private key in MONyog --> Private key section.
Give Passphrase and click on "Test Connection".

Attached Files



#7 paulohm1

paulohm1

    Member

  • Members
  • PipPip
  • 13 posts

Posted 22 February 2012 - 07:45 PM

I was able to get the connection to work from MONYog to the DB server when using Password Authentication. So it seems like it is an issue with the format of my private key that I am pasting into Monyog. Am I able to use a key that I generate with Puttygen and then convert to Openssh format using puttygen (this is what I have tried in the past and has not worked)? I am unable to create the key using CopSSH on the DB server for unrelated reasons. Is there anything else I can use to create the keys if puttygen does not work?

#8 Mahesh

Mahesh

    Advanced Member

  • Admin
  • PipPipPip
  • 491 posts
  • Gender:Male
  • Location:Bangalore,India
  • Interests:MySQL, Cricket, Music..

Posted 23 February 2012 - 04:01 AM

MONyog supports only standard OpenSSH keys and keys generated using Puttygen or any other tool does not work.

#9 paulohm1

paulohm1

    Member

  • Members
  • PipPip
  • 13 posts

Posted 24 February 2012 - 12:49 PM

MONyog supports only standard OpenSSH keys and keys generated using Puttygen or any other tool does not work.


Are there any tools that you recommend to generate standard OpenSSH keys that will work with MONYog? I had previously only ever used PuttyGen and then converted the ppk to OpenSSH, but I guess you're saying that doesn't work?

#10 peterlaursen

peterlaursen

    Advanced Member

  • Admin
  • PipPipPip
  • 7,868 posts
  • Gender:Male
  • Location:Skagen, Denmark
  • Interests:well ... jazz/folk music, photography, chess, nature, ecology, history, bicycling, Highland Malts ... well, Lowland Malts and Cognac too actually :-) just wonder how I get the time to touch a computer! SQLyog and MONyog? no that's not interest, that's BASIC NEEDS simply!

Posted 24 February 2012 - 03:29 PM

Do you have a Cygwin command line?
Computers make your grey hair come off ....

Peter Laursen
Webyog

#11 paulohm1

paulohm1

    Member

  • Members
  • PipPip
  • 13 posts

Posted 24 February 2012 - 08:13 PM

I tried creating the key with cygwin using the following command:

ssh-keygen -b 2048

I copied the .pub key that was created into authorized_keys on the server and copied the private key into monyog, but I am still unable to connect.

However, using the ssh client built into cygwin, I am able to connect using the same user and private key, so I know the public/private key authentication is working.

#12 Mahesh

Mahesh

    Advanced Member

  • Admin
  • PipPipPip
  • 491 posts
  • Gender:Male
  • Location:Bangalore,India
  • Interests:MySQL, Cricket, Music..

Posted 27 February 2012 - 06:50 AM

Please create a ticket by sending an email to "support@webyog.com"
We will discuss regarding this in ticket system and if required arrange a screen sharing session.

#13 paulohm1

paulohm1

    Member

  • Members
  • PipPip
  • 13 posts

Posted 27 February 2012 - 02:47 PM

Please create a ticket by sending an email to "support@webyog.com"
We will discuss regarding this in ticket system and if required arrange a screen sharing session.


Thanks, I created the ticket

#14 peterlaursen

peterlaursen

    Advanced Member

  • Admin
  • PipPipPip
  • 7,868 posts
  • Gender:Male
  • Location:Skagen, Denmark
  • Interests:well ... jazz/folk music, photography, chess, nature, ecology, history, bicycling, Highland Malts ... well, Lowland Malts and Cognac too actually :-) just wonder how I get the time to touch a computer! SQLyog and MONyog? no that's not interest, that's BASIC NEEDS simply!

Posted 27 February 2012 - 03:40 PM

.. and we have received it.
Computers make your grey hair come off ....

Peter Laursen
Webyog

#15 dvanhollen

dvanhollen

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 24 October 2012 - 04:00 PM

What was the resolution here? I'm experiencing a similar issue with an SSH connection between two Linux hosts, despite being able to connect @ commandline..




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users