SCP command on bash script

Hi!

I want to use scp command on bash replit project but the command is not installed. Then I’ve tried to install via apt or apt-get with and without sudo but it seems it’s blocked or something like that.

Does someone know how should I do to install the command or call it some other way?

Thanks!

Hi @aitorerana welcome to the community!

Can you explain more about what you want to do with SCP in your Repl?

Hi @IanAtCSTeach !
I want to write some HTML on my replit project and then use SCP command to publish it on my host server.

Hi @aitorerana when you click run on an HTML replit project it creates a published link which you can use. Your host server could include a redirect to the replit link? Scp isn’t required.

For example: https://replit-creates-1-worst-website.ianatreplit.repl.co/ is the same as https://replit.csteach.uk

It might need to be “always on”. Hope this makes sense.

Hi @IanAtCSTeach !

Yes you are right! If you create an HTML replit project you can publish it directly and share with the public URL. But I have a BASH replit project and want to publish some files on other server. It’s more a personal goal than a problem.

Don’t waste long time with this, only wanted to know if it was possible.

1 Like

Ah! Sorry I understand now. The BASH file creates the HTML?

I don’t think it is possible, sorry.

That’s it!!

I’ve found something, it’s not by command but I can follow with some other steps.

If yout go to Shell tab on the right side, close to the Console tab, and writes a command lik ein a terminal, if it detects the command it suggests to install via Nix (or something like this, I don’t remember the full sentence). You only have to pues “Y” and the instalation starts. Now you can use that command via Shell or in you code.

It will be perfect if in my code I could check if the command exist and if not run some Nix command to install it. But first I have to be able to connect to the server and send the file correctly.

Thanks for all @IanAtCSTeach !!

Morning @aitorerana ,

That’s excellent news you managed to install via Shell! I just tried this and can confirm that it does install scp if you just type scp in the shell. Brilliant find!

I’ve created two Repls for you to see the difference between when scp is installed and not installed. Hope this helps!

https://replit.com/@IanAtReplit/CheckingSCPExists-installed

https://replit.com/@IanAtReplit/CheckingSCPExists-notinstalled

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.