Comments (9)
Is this the correct usage for a DSA key:
AS_sftp.set_log_level (3);
AS_SFTP.open_connection( 'some sftp server' , i_trust_server => true);
AS_SFTP.login('username','password','-----BEGIN DSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,68248D6AE3FFF058
O78kfuI+szElw9lCRHB9xC3G8wztPpGIjZie9Ogt4Xs7Tp0uZI2kixdi6s3xa5Kd
...
...
q1HzyYTpbVw9L5D3f219tCE2wc2fib2k
-----END DSA PRIVATE KEY-----','passphrasse',3);
AS_SFTP.close_connection();
from as_sftp.
That is the right usage for a DSA key, at least as 'passphrasse' is the password/phrase for you DSA key.
Maybe you can try a DSA key which is not encrypted. I will try some more DSA keys on my test server. maybe I can reproduce the issue.
P.S. You do know that you need the public key which belongs to the private key installed for user "username" on your SFTP server?
from as_sftp.
P.S. You do know that you need the public key which belongs to the private key installed for user "username" on your SFTP server?
Yes. It works with Putty and FileZilla, so connection with the key is possible.
from as_sftp.
I added some extra logging:
signature OK
host fingerprint: ***
===> Read until 15
===> Read 15
===> Read until 06
===> Read 060000000...
ssh-userauth accepted
try method none
===> Read until 34 or 33
===> Read 330000000...
cannot connect with method none!
Available methods:publickey
try method password
===> Read until 34 or 33
===> Read 330000000...
cannot connect with method password!
try method publickey
Parse private key succeeded
try ssh-dss public key without signature
===> Read until 33 or 3C
===> Read 330000000 (this is unexpected!!)
ssh-dss public key not OK
But if I remove method password, I get this:
signature OK
host fingerprint: MD5*
===> Read until 15
===> Read 15
===> Read until 06
===> Read 060000000*
ssh-userauth accepted
try method none
===> Read until 34 or 33
===> Read 330000000*
cannot connect with method none!
Available methods:publickey
try method publickey
Parse private key succeeded
try ssh-dss public key without signature
===> Read until 33 or 3C
server accepts ssh-dss public key
try ssh-dss public key with signature
===> Read until 34 or 33
===> Read 34
ssh-dss public key OK
logged in
===> Read until 5B or 5C
===> Read 5B000000*
===> Read until 63 or 64
===> Read 630000007B
===> Read until 5E
===> Read 5E0000007B*
sftp openend, server version: 3
sftp open
===> Read until 61
===> Read 600000007B
===> Read 610000007B
everything closed
I have the impression that some of the response messages are responses from older messages being sent to the server...
from as_sftp.
This very helpful. I will look into it. I couldn't reproduce it myself
from as_sftp.
Hi,
Maybe if the first two connect attempts fail (none, password) then the 3rd connect attempt (pk without signature) is a Failure (a ssh server max parameter ?).
I can try to make 2 attempts of method none, and see if the method password works on 3rd attempt on my server.
from as_sftp.
I've attached another version, which first tries the private key method, then the password method and if still not yet logged in the none method.
as_sftp.zip
from as_sftp.
I added this around the password try:
if auth_methods IS NULL or auth_methods.COUNT = 0 or 'password' MEMBER OF auth_methods THEN
...
END IF;
In other words, the 'password' method is skipped if the server indicates it is not supported. That solves my problem too
from as_sftp.
Nice to hear your problem is solved. Curious to know what SFTP-server you use by the way, as that behaviour is not according RFC-4252.
from as_sftp.
Related Issues (20)
- MKDIR (create a directory) implementation HOT 1
- Problem with download HOT 14
- Login using a RSA key HOT 4
- support for ed25519 HOT 2
- First attempt to open connection failed HOT 5
- Login with RSA Key and Passphrase HOT 1
- Key management HOT 1
- rsa-sha2-256 for login HOT 1
- ORA-29276: transfer timeout faced while using as_sftp.put_file HOT 1
- Problem with open_connection HOT 1
- Does the package support RSA key login? HOT 2
- TLS_AES_256_GCM_SHA384 HOT 1
- New Ciphers? HOT 1
- Support for read_dir function HOT 2
- Type conversion in login_pk function HOT 1
- Read_dir in recursive mode HOT 1
- Uploading the file partially HOT 2
- Oracle Autonomous Transaction Processing (ATP) and Compute Instance sftp HOT 4
- Incorrect signature verification for ssh-dss HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from as_sftp.