[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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
There is less than 12 hours left to vote in the 2015 LinuxQuestions.org Members Choice Awards. Click here to go to the polls. Vote now and make sure your voice is heard!
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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.