-1
I try to connect to my server via sftp but I get FTP server XY refused connection.
So I tried it again with the FTP Client FileZilla, and there it works.
This is my config:
I also tried to change the port in NetBeans to 22 which is the port used for sftp... but then I get:
"Cannot connect to server XY. (Cause: Could not parse response code. Server reply: SSH-2.0-OpenSSH-7.2p2 Ubuntu-4ubuntu2.8)"
/etc/vsftpd.conf
write_enable=YES
dirmessage_enable=YES
nopriv_user=ftpsecure
ftpd_banner=Willkommen auf dem Entwicklungsserver
ls_recurse_enable=YES
local_enable=YES
local_umask=002
chmod_enable=YES
file_open_mode=0644
anonymous_enable=NO
anon_world_readable_only=YES
syslog_enable=YES
connect_from_port_20=YES
ascii_upload_enable=YES
pam_service_name=vsftpd
listen=YES
#listen_ipv6=YES
ssl_enable=NO
rsa_cert_file=
dsa_cert_file=
#
# Limit passive ports to this range to assis firewalling
pasv_min_port=30000
pasv_max_port=30100
What am I doing wrong?
But why does it work in FileZilla and not in NetBeans? – Black – 2019-09-04T07:05:02.667
Because FileZilla does both SFTP and FTPS. What config do you use in FileZilla? – user1686 – 2019-09-04T07:05:39.783
I did not setup any config, everything is in default. I just connect with
sftp://<<ip>>
– Black – 2019-09-04T07:07:07.760Right, so you're telling FileZilla to use SFTP, but you're telling NetBeans to use FTP. Those are different things. – user1686 – 2019-09-04T07:08:39.617
Then how can I tell NetBeans to use SFTP? – Black – 2019-09-04T07:10:02.217
Look under the "Encryption:" dropdown. If it has SFTP, select it. If it doesn't, that means you cannot use SFTP in NetBeans. (Try this plugin.)
– user1686 – 2019-09-04T07:10:52.027Thats wrong, I can change the port to 22, which is the port used for sftp... but then I get another error: "Cannot connect to server XY. (Cause: Could not parse response code. Server reply: SSH-2.0-OpenSSH-7.2p2 Ubuntu-4ubuntu2.8) – Black – 2019-09-04T07:12:58.773
You're just changing the port number – that doesn't magically teach NetBeans to speak the protocol. That's what the error is saying: NetBeans doesn't understand what the SSH/SFTP server is sending, because NetBeans is expecting the server to be FTP, not SFTP. – user1686 – 2019-09-04T07:17:55.600
I have other servers which I am connecting to via sftp successfully, so NetBeans does understand sftp. It even added the tag [SFTP] to the connection name. – Black – 2019-09-04T07:24:03.943