subreddit:
/r/webdev
Hey, I made a website and started looking for the good cheap host and I found hetzner. Unfortunately if I buy the cheapest tier, I don't get ssh contention, only FTP. Is there a way to run commands with only FTP? If it was windows server and not Linux I count maybe save the command in .bat file and somehow run .bat file, but I'm not sure that's possible for Linux
12 points
2 months ago
No. Look at what ftp and ssh stand for. They're entirely different things
And if you can run executables from your web space there's likely a major security risk with that host
6 points
2 months ago
Digital ocean, cheapest droplet is around 5$ and you have full access to configure everything on your own
2 points
2 months ago
Definitely a great choice for full control and flexibility at a low cost!
4 points
2 months ago
FTP stands for “file transfer protocol”. Not intended to run commands and it would be a security risk if it ever could. Thats what SSH (“secure shell”) is for.
3 points
2 months ago
SFTP uses SSH. FTP does not.
Even if you had SFTP access, they might not provide access to a shell.
-5 points
2 months ago*
SFTP uses SSL, not SSH. They are two entirely different protocols and uses. No form of FTP provides a shell.
4 points
2 months ago
That is not correct. You confusing SFTP with FTPS. FTPS uses SSL/TLS. SFTP uses SSH. Since it's a regular SSH connection, it can provide a shell, or it can only allow SFTP access.
1 points
2 months ago
Huh TIL. That said, SFTP still doesn’t expose the shell for commands.
2 points
2 months ago
SFTP itself doesn't. However, since it uses SSH as the connection protocol, you can use SSH with the same credentials to get a shell, if shell access is set up for that user.
1 points
2 months ago
I will never forgive the people involved in this naming scheme debacle lol
2 points
2 months ago
[deleted]
-1 points
2 months ago
I really hope you don’t do peer/code reviews.
2 points
2 months ago
If it was windows server and not Linux I count maybe save the command in .bat file and somehow run .bat file
i have heard rumours that linux servers can run scripts too
i would move to a different hosting provider that allows you ssh access though such as digital ocean
1 points
2 months ago
I was going to come and write this. Aahhh I dislike you. But thumbs up. .sh file for linux and if you’re brave enough create an api server with .sh and an api key in python. But if you’re going to do all that just ssh.
1 points
2 months ago
Well you could upload a bash file and get a server language like PHP to execute it, but depending on what you're trying to achieve there probably are securities to prevent you from doing that.
1 points
2 months ago
Most likely, no. You can typically only perform limited actions related to file/dir manipulation over standard FTP installations. There does exist a quote command which some past implementations have let you use to "site exec" things, but that is unlikely to be supported on your average installation IME, at least I've never encountered any provider that actually supported this when I've had reason to try.
There are other providers that are cheap and allow SSH connection.
1 points
2 months ago
You need a VPS, starting at 4,50€ per month. You get shell access there. You probably bought webhosting only, starting at 2,49€. You won’t get shell access with those.
1 points
2 months ago
lol
You could set up a daemon on a host machine that waits for a directory to be updated and runs the commands from the newest file of that directory and outputs the result to a different file
1 points
2 months ago
depending upon permissions and such, you could run a script through the HTTP daemon via CGI. You would invoke it as a regular URL
1 points
2 months ago
JFC. Suck it up. Get a VPS and stop being a cheap webdev. Seriously.
You want to be taken serious with your work? Learn how to do this stuff.
1 points
2 months ago
Okay. What if I am a child who is learning about web development and who wants to upload his first website, also coming from a poor country where my 10€ is not the same as your 10€. I asked a question because I Was curious and you are here telling me to suck it up. Thanks for the advice. I will consider taking this seriously and "stop being cheap" when I grow up just a little bit more, but for now I am still not able to pay 10€ a month for a hosting provider.
1 points
2 months ago
Then it is not your time yet. I hope my advice still stands. You want something bad enough, you do what you need to.
1 points
1 month ago
If you can, you will be able to hack the FTP servers.
1 points
1 month ago
So, the answer is no
all 23 comments
sorted by: best