-1

I am facing strange issue in Tamir SharpSSH while connecting it. first time when I connect SFTP using below code, it connect successfully. but when this method calls again it breaks into this error : SSH_MSG_DISCONNECT: 2 Too many users for this IP

public bool getDir(string directory){
     Sftp s = new Sftp(ConfigurationManager.AppSettings["SFTPUrl"], username, password);
s.Connect();
s.Mkdir(directory);
s.Close();

}

This issue happens only at my production environment not from my localhost. please help me here.

1 Answers1

0

Hard to say without more information, but it looks to me like the SFTP server is preventing you from connecting too often. Maybe you can keep the Sftp object around instead of creating/closing it every time?

Gaelan
  • 1,149
  • 11
  • 25