-1
1
ANSWER: ufw allow 22/tcp
I'm setting new server(ubuntu server 18.04) for small browser app and I was trying to establish sftp to my windows 10.
I used this tutorial:https://www.digitalocean.com/community/tutorials/how-to-enable-sftp-without-shell-access-on-ubuntu-18-04#prerequisites
I succesfully execute sftp ricardo@192.168.10.5 so it works on server. Chroot also works. I can ping my win 10 form server and viceversa, also i see my app on LAN. example: http://192.168.10.5/info.php. Also i can ping particular port using nmap
nmap:
Nmap scan report for 192.168.10.5
Host is up (0.00s latency).
PORT STATE SERVICE
22/tcp filtered ssh
(for port 20) 20/tcp filtered ftp-data
MAC Address: 00:xx:xx:xx:xx:xx (VMware)
Nmap done: 1 IP address (1 host up) scanned in 12.15 seconds
my_sshd_config:
Match User ricardo
ForceCommand internal-sftp
PasswordAuthentication yes
ChrootDirectory /var/www
PermitTunnel no
AllowAgentForwarding no
AllowTcpForwarding no
X11Forwarding no
from filezilla i get:
Status: (...)
Status: (...) 192.168.10.5:20...
response fzSftp started, protocol_version=8
command: open "ricardo@192.168.10.5" 20
error: (...)
error: (...)
simmilar error on Cyberduck(where I seted exact dir to: var/www) "Connection timed out: connect. The connection attempt was rejected. The server may be down, or your network may not be properly configured"
You are right i added more data. – galli – 2019-06-19T06:23:30.713
Is your SFTP server on Digital Ocean? Or is it a local network server? + Why are you using port 20? – Martin Prikryl – 2019-06-19T06:44:13.843
No, all is in LAN and i used port 20 becouse i had no idea why port 22 isn't working – galli – 2019-06-19T06:52:04.363
So is your SSH/SFTP server running on port 20? If
sftp ricardo@192.168.10.5
works, then it's not running on port 20. So do not show us irrelevant logs. Show us logs for port 22. – Martin Prikryl – 2019-06-19T06:52:38.327I think it's not. In ufw i have this ports as i think open( 80,443/tcp for apache) and (22/tcp for OpenSSH). I wonder why i get this nmap 20/tcp filtered ftp-data form this command >nmap -p 20 192.168.10.5(full log above) – galli – 2019-06-19T06:55:41.770
maybe this is a problem [link]http://prntscr.com/o3q570
– galli – 2019-06-19T07:17:07.290