Start SFTP server automatically when the system restarted

Hi Experts,

We are using freeFTPd as our sftp server and it is working fine. The only problem is when the server is restarted, i does not start automatically. Any suggestion how to start this automatically when the server is restarted? Also any suggestion if there are any better SFTP server which will start automatically after a system reboot?
Thanks in advance.
RadhaKrishnaKiJayaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Michael MachieIT SupervisorCommented:
Option#1
Place a shortcut to the .exe for the program into your 'startup' folder in ypur applications list.
If you normally double-click a file tonlaunch the program that is the '.exe' im referring to. It could be a different filre type like .msi or .com etc.
This would be the easiest method.

Option #2
If this is available as an option for your software, open Services.msc (run-services.msc- [enter] ) and look for the service for your ftp software.
Open the properties of that service and set it to start automatically if not already.

Other option I have used is Globalscape SFTP software. Inexpensive, one-time purchase.
RadhaKrishnaKiJayaAuthor Commented:
Hi Michael,
Thank you for the response. I will try the first option. The second option is already automatic. Another quick question. Is there any way we can keep looking at it using some kind of script and if it is not running then start running it?

Thank you again.
Michael MachieIT SupervisorCommented:
Lets handle the first issue in this question and we can answer that in another question, but yes, I am sure a way exists. I actually already have an idea to proof out.

Very important to keep the discussion matching the question so people in the future can get the answers they need.
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

RadhaKrishnaKiJayaAuthor Commented:
I tried your suggested option1. It is going to the opening screen(FTP1.png).  But not starting the server itself. I have to start it manually. (FTP2.png). Basically that is my problem. any suggestion?

Thank you!
Ftp1.png
FTP2.png
Michael MachieIT SupervisorCommented:
Hi,

Any luck with this yet?
I have not been able to find a way to auto-start the SFTP service specifically yet.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RadhaKrishnaKiJayaAuthor Commented:
Hi Michael,
Yes, luckily I found a way to restart the SFTP server.  

1. Write this code into a batch file.
[code]
@echo off
Set log="C:\ftpstartup.log"
echo sleeping 30 seconds > %log%
sleep 30
echo starting service >> %log%
net start freeFTPDService >> %log%
echo looking for listener... >> %log%
for /F "tokens=2" %%i in ('netstat -a -n ^| findstr "^.*TCP.*:22.*LISTENING$"') do Set FTPPROC=%%i
IF "%FTPPROC%"=="" goto failed
echo Service listening on %FTPPROC% >> %log%
goto end

:failed
echo failed to start service... >> %log%

:end
Set FTPPROC=
Set log=

Open in new window


[/code]

2.  Go to services -> Change the freeFtpdService to 'manual'
3.  Open the run command window and type 'mmc'
4.  Click File -> Add/Remove snap in
5.  Add 'Group Policy Object' for 'Local computer' -> Click Finish
6. Click 'Local computer policy' -> Computer configuration -> windows setting -> script(startup/shutdown) -> double click startup -> Add the batch file in which the script is present.
7. Restart the computer
8. but in this method you can not see the window, which says sftp is running. If u want to see that then just kill the instance in task manager and open it again.

Hope it will help!

Thanks.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
FTP

From novice to tech pro — start learning today.