N
nightmare
Gast
Hallo,
versuche mich über den SFTP Client auf mein Server einzuloggen.....
erhalte aber folgende Fehlermeldung.
versuche mich über den SFTP Client auf mein Server einzuloggen.....
erhalte aber folgende Fehlermeldung.
Java:
java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at org.apache.commons.net.SocketClient.connect(SocketClient.java:176)
at FTP.connect(FTP.java:28)
at FTP.main(FTP.java:40)
Java:
import java.io.IOException;
import java.io.PrintWriter;
import java.net.SocketException;
import java.security.NoSuchAlgorithmException;
import org.apache.commons.net.PrintCommandListener;
import org.apache.commons.net.ftp.FTPSClient;
public class FTP {
private FTPSClient ftpsClient;
boolean tracer = true;
private String server = "comserver.hs-esslingen.de";
private String user = "";
private String pass = "";
private int port = 80;
public void connect() {
try {
ftpsClient = new FTPSClient("SSH");
ftpsClient.addProtocolCommandListener(new PrintCommandListener(
new PrintWriter(System.out)));
} catch (NoSuchAlgorithmException ex) {
ex.printStackTrace();
}
try {
ftpsClient.connect(server, port);
ftpsClient.enterLocalPassiveMode();
} catch (SocketException ex) {
ex.printStackTrace();
} catch (IOException ex) {
ex.printStackTrace();
}
}
public static void main(String[] args) {
FTP ftp = new FTP();
ftp.connect();
}
}