Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not able to connect with sftp server #79

Open
vikaskumr opened this issue Dec 4, 2019 · 9 comments
Open

not able to connect with sftp server #79

vikaskumr opened this issue Dec 4, 2019 · 9 comments

Comments

@vikaskumr
Copy link

FTP {
options:
{ host: 'host',
username: 'username',
password: 'password',
port: 990,
escape: true,
retries: 1,
timeout: 10,
retryInterval: 5,
retryIntervalMultiplier: 1,
requiresPassword: true,
protocol: 'sftp',
autoConfirm: true,
cwd: '',
additionalLftpCommands: 'set ssl-allow true;set ssl:verify-certificate no;set passive-mode yes',
requireSSHKey: false,
sshKeyPath: '' },
cmds: [] }

I am trying to connect my sftp server with this configuration but I am always getting

{ error: 'ls: Fatal error: max-retries exceeded\n', data: '' }

@MichielMag
Copy link
Collaborator

Hey @vikaskumr, it's been a while, but do you still need help? On my first gaze I can see that you tried to use port 990 (FTPS) for an SFTP server (which are hosted on port 22 most of the time).

@mynameiszsofia
Copy link

I would like to reopen this issue with my problem if this is possible. My problem is the same as it mentioned above, i attach the code what i use:

import ftps from 'ftps';

export default (feedbackConfig: ftps.FTPOptions): ftps => {
  const {host, username, password, protocol, port} = feedbackConfig;

  return new ftps({
    host,
    username,
    password,
    protocol,
    port,
    autoConfirm: true,
    additionalLftpCommands: ['set ssl-allow true', 'set ssl:verify-certificate no', 'set passive-mode yes'].join(';'),
  });
};

The error message is : Fatal error: max-retries exceeded
The sftp content is correct i can join to the sftp with FileZilla if this mean something, and the port is 22 so i would like to connect to sftp.

Any help would appreciate.

@MichielMag
Copy link
Collaborator

Hey @mynameiszsofia
I understand why you're stuck there, because everything looks fine on the surface.

Could you try to debug your problem using the LFTP command directly in your CLI?
It should probably give you a more detailed error.

I also had some issues with certificates in the past by the way. One way to solve that was to manually download the certificate from the server and adding it to the certificate storage of my OS.

@mynameiszsofia
Copy link

Thank you so much for the fast reply, i will try to debug, and i will report what i found even if i could fix or not, for the future interest

@mynameiszsofia
Copy link

mynameiszsofia commented Jun 8, 2021

@MichielMag i returned with the debug message, i need some help because it's not really tell me something:
[702] hostname ---> sending a packet, length=5, type=1(INIT), id=0
[702] hostname **** Timeout - reconnecting
[702] hostname ---- Disconnecting
it's reconnecting i see but i don't know why, we investigate the sftp connection and it's fine

any help would appreciate, thank you!

@MichielMag
Copy link
Collaborator

Is LFTP running om the same device as your FileZilla?

@mynameiszsofia
Copy link

actually no because the lftp is running in docker container but we checked the sftp connection via FileZilla in a local computer

@MichielMag
Copy link
Collaborator

Can you ping the server from that docker container? Can you use the SSH command from that container to connect to your SSH server?

It sounds to me like it actually is a network issue.

@mynameiszsofia
Copy link

@MichielMag thank you so much for your time and sorry for the interrupt, our problem was with proxy so yes it was a network issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants