[SOLVED] setup FTP on Linux server which has static IP
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I have Linux server which has static public IP, It means I can access this server from anywhere through internet.
I want to configure ftp on this server so I can upload files from anywhere.
How can I configure ftp?
I want to give username password for particular directory, so after putting username password, only that directory and its sub-directories should be accessible. User should not go anywhere else besides this directory.
you would want to refer to standard documentation for the FTP server of your choice. I can suggest vsftpd if you have no preference already. For restrictions, look at chroot jailing users, as per their documents.
Your ssh may be only listening on the private IP of the server and hence not accepting connections on port 22 on public IP. Configure ssh server to listen on public IP as well. And be aware of the consequences if you do not have proper security in place. Avoid remote root logins. Have very strong passwords and have firewall in place. Better off, have public key authentication rather than password authentication.
How can I configure/enable ssh for public IP ? I want to access server using username-password.
I have followed following steps.
1. Edit the file /etc/ssh/sshd_config
2. Set the listen address for my public IP and private IP.
3. Restart the ssh server.
4. But when I run following command,
$ netstat -tulpn | grep :22
it gives me only one o/p for my private IP. It does not show my public IP in list.
tcp 0 0 192.168.2.8:22 0.0.0.0:* LISTEN 9980/sshd
5. When I try to access my public IP using ssh, it gives me same error.
ssh: connect to host 111.45.xx.x port 22: Connection refused
The problem is solved.
The solution what I got is not related to this forum.
I have made a contact to my sys-admin. He closed the port 22, reset the router and opened the port again.
Now I am able to connect it through sftp. But I couldn't understand what was the problem.
Thank you very much for giving me your precious time and suggestions.