Connection Issue - WeOnlyDo Discussion board

Connection Issue (General questions)

by Scots, Friday, November 18, 2011, 18:14 (4752 days ago)

I've recently changed from using login / password
to a login / key
in our first attempt
we are getting an error message on the host side, saying
PASS PHRASE IS NOT VALID
but.. I didn't use a passphrase in creating the key
is there something wrong in the way I did this?
I generated the key on the client side... sent it to someone at the host... who added it to authorized key file
then.. tried to do a connect
generating key
ole_cer.generatekey(0)
ole_cer.savekey(f_path)

connecting
ole_cer = CREATE oleobject
ole_cer.ConnectToNewObject( WeOnlyDo.Certificate.1 )
ole_cer.loadkey(f_path)

ole_ftp.object.hostname = ftp_site
ole_ftp.object.login = ftp_acc
ole_ftp.object.certificate = ole_cer
ole_ftp.object.authentication = 2
ole_ftp.object.transfermode = 0
ole_ftp.object.blocking = 0
ole_ftp.object.protocol = 1
ole_ftp.object.compression = 6
ole_ftp.object.passive = 1
ole_ftp.object.port = 22

Re: Connection Issue

by woddrazen, Friday, November 18, 2011, 18:22 (4752 days ago) @ Scots

Hi,


If I understand correctly you are receiving this error from server?

What happens if you try to connect to same server using some other SFTP client like winSCP for example?

Does it work or you received same issue?


Regards,
Drazen

Re: Connection Issue

by ScotS, Friday, November 18, 2011, 19:32 (4752 days ago) @ woddrazen

Hi,


If I understand correctly you are receiving this error from server?

What happens if you try to connect to same server using some other SFTP client like winSCP for example?

Does it work or you received same issue?


Regards,
Drazen

they tried to use ws_ftp, and tried to import the key from the file, in which it was saved
it asked for a password to decrypt it ??
not sure, if they did this properly.
I don't see a way to attach the file here

-----BEGIN RSA PRIVATE KEY-----
MIICWwIBAAKBgQCr0sm4ifHoMQdHnw3X9kxQvh93oYk65zKKlOhcc1ixEXZlQZ1h
gMpnCXILrMEfMCqE1tahafq623LblgcfincwY5mwFbD0wO0ZCtWP9yhYWMIXBOIS
ZRt9k2Qn5+j9nRb9n43wmKjRyhRKZgIhd2EmAjtfP7wzjymlw40A2DOthwIBIwKB
gF1GisNDkfMTTRhAZpnO2PihuU+SNI2wtQlmx0ghXAhZ79CRVW9xzPYbEgZWd3dU
qV4OOf/acirsKGiTRbIJVqRZoQTs7ihX4bqvdnU/RPgCG8d+J1PrhocOINttds/B
8457bOLbXheo/u06Xp9fY4XSm1frU+uRvGPoGamXfCqLAkEA1gfdqq9gtJXaVdL0
9Tsp+wM4IxhV/lPB2uPoNQKDy7lfCQ9w5Or5waqzJ+rIKVFrztvLvruc34cmaLbe
5yqsgQJBAM2EJ6kU+OO3bYy8mprZ7D7qA5sVgCC0+NReq313ZuVZmB7r0FWJx2VQ
nuAKunXsm0Ofu6cVKBxv4kN+cEXF9gcCQQDJzObxY4cQqowHxub12LKNlVIvt9wN
DSR97NOfsen6mNXymYezQ/LMiwCwm4mGCvCed3b1qZPosqCOncrZ9QkLAkEAnoqE
/scJJLISrmWb1ora0XKyUxCWCpo8TA6ESthz8sF1Wa6ZZo7bpe28Y7CBNmYRYA2C
Ic5+B07/AN3hlOkrgQJAdT+HBO6CWSvIIpTq45DlKq3uKmVl7FUiz6yL/XkPUaCY
dTNsIliZF/cM40iVmYp/6LSxvEubvVO/8Zlbo2tN8Q==
-----END RSA PRIVATE KEY-----

Re: Connection Issue

by woddrazen, Friday, November 18, 2011, 21:43 (4752 days ago) @ ScotS

Hi,


I can open your private key on our side without any problem. It didn't ask for any password.

You don't need to send then your private key. You can generate and save from your private key public key. Private key is secret key. Only you should use it.

Here is example how to generate public key from private key:
http://www.weonlydo.com/index.asp?kb=1&View=entry&EntryID=54

Also I found this article on WS FTP site. I suppose you are using WS FTP server?

http://support.ipswitch.com/kb/FS-20071012-CW01.htm

in article they mention that WS FTP server 6 has an issue with OpenSSH keys. So you need to generate private and public key with PuttyGen and send then such key.


Drazen

Re: Connection Issue

by Scots, Monday, November 21, 2011, 13:43 (4749 days ago) @ woddrazen

Hi,


I can open your private key on our side without any problem. It didn't ask for any password.

You don't need to send then your private key. You can generate and save from your private key public key. Private key is secret key. Only you should use it.

Here is example how to generate public key from private key:
http://www.weonlydo.com/index.asp?kb=1&View=entry&EntryID=54

Also I found this article on WS FTP site. I suppose you are using WS FTP server?

http://support.ipswitch.com/kb/FS-20071012-CW01.htm

in article they mention that WS FTP server 6 has an issue with OpenSSH keys. So you need to generate private and public key with PuttyGen and send then such key.


Drazen

I don't seem to have the capability of doing the Publickeysave
I'm using wodftpdlx which is using wodcertifcate component
most of the operations that I see available, look to be using private keys

Re: Connection Issue

by woddrazen, Monday, November 21, 2011, 13:52 (4749 days ago) @ Scots

Hi,


If you want to save it to a file. You can copy received string from PublicKeyOpenSSH and paste it to some new created file and save it.

Can you try that maybe?

You can find here example how to generate and save private and public key with wodCertificate:
http://www.weonlydo.com/index.asp?kb=1&View=entry&EntryID=51


Drazen

Re: Connection Issue

by Scots, Monday, November 21, 2011, 14:13 (4749 days ago) @ woddrazen

Hi,


If you want to save it to a file. You can copy received string from PublicKeyOpenSSH and paste it to some new created file and save it.

Can you try that maybe?

You can find here example how to generate and save private and public key with wodCertificate:
http://www.weonlydo.com/index.asp?kb=1&View=entry&EntryID=51


Drazen

most of the operations on public keys... are properties.. and not methods / functions.
I tried to see if I could display the public key..
but, it doesn't appear to feed into a string field

ole_cer = CREATE oleobject
ole_cer.ConnectToNewObject( WeOnlyDo.Certificate.1 )

ole_cer.generatekey(0)
ole_cer.savekey(f_path)

key_value = ole_cer.publickey
messagebox('error',key_value)
ole_cer.export(f_path2)

Re: Connection Issue

by woddrazen, Monday, November 21, 2011, 14:18 (4749 days ago) @ Scots

Hi,


Can you maybe try something like this:
[code]key_value = ole_cer.PublicKeyOpenSSH[/code]
Does it work like this maybe?


Drazen

Re: Connection Issue

by scots, Monday, November 21, 2011, 14:18 (4749 days ago) @ woddrazen

Hi,


If you want to save it to a file. You can copy received string from PublicKeyOpenSSH and paste it to some new created file and save it.

Can you try that maybe?

You can find here example how to generate and save private and public key with wodCertificate:
http://www.weonlydo.com/index.asp?kb=1&View=entry&EntryID=51


Drazen

most of the operations on public keys... are properties.. and not methods / functions.
I tried to see if I could display the public key..
but, it doesn't appear to feed into a string field

ole_cer = CREATE oleobject
ole_cer.ConnectToNewObject( WeOnlyDo.Certificate.1 )

ole_cer.generatekey(0)
ole_cer.savekey(f_path)

key_value = ole_cer.publickey
messagebox('error',key_value)
ole_cer.export(f_path2)

ok... think I found it... using publickeyrsa1 or publickeyssh which will convert into a string