Since SSH already works, you could just open a new terminal and run scp form there. It is most comfortable when done from the remote session: You just run a script or paste an heredoc from within this session and you are done: Now need to exit to the previous session or opening another window of a local session I don't see what heredocs have to do with anything, but you do have an obsession with those.
No, it's just a comfortable way to paste multi-row code in place, without storing small script files inside the system bur rather copy them from a single script vault file. I just gave that as an example Add a comment. Active Oldest Votes. Scenario 1: If ComputerA is not behind an NAT firewall This is a swift and easy solution, combining scp and ssh scp performs a secure copy using ssh protocols. Scenario 3: perform the file copy from ComputerA Or rather than trying to do it from ComputerB, you can just run the scp command from ComputerA.
Improve this answer. Benia, if you don't have an ssh server configured on ComputerA, then Scenario 3 is your only real option. You could use netcat and the -R switch in ssh, but that's a lot of hassle requires running netcat on both machines for file transfer and makes less sense than the scenario 3 approach.
Scenario 3 does not require ComputerA to have an ssh server installed. Indeed, but it does require leaving everything in scenario 3, opening another local session, and then mining the data with an heredoc or a script because it has a few lines That's non minimal by means of doing everything in one place and indeed scenario 3 or scenario 4 - netcat seems the most minimal solutions in that sense. Benia, There's a huge difference.
Of note, netcat is not encrypted. From the sound of it, netcat probably isn't going to suit you either because you need to start netcat listening on ComputerA before you can send a file from ComputerB for EACH file transfer.
This can be automated with a script running in a loop on ComputerA. If that's something you want more feedback on, make a new question to that affect, and bump me here and I'll elaborate more. Have you considered using screen? I didn't know screen basically but I would prefer something direct at the moment, so I guess Setting up an OpenSSH server is the best option for me.
It also best because it gives me encryption which I also desire and it's good you brought that up. Show 5 more comments. Installation sudo apt install sshfs Unlike this guide I haven't done anything other on my Ubuntu Community Bot 1. This is what this process looks like in reality:.
I am looking for a way to do so from the SSH session On the client? Can you please edit the answer with an explanation on how you would do that in your end? You're basically using the scp command in reverse. Rather than scp from remote to local, since you're already in the other machine you're "local" computer is now "remote" It was a suggestion based off of this post unix.
Sorry, I think I missed if you finally say it is possible or not. I also consider offering bounty over this. This makes scp preferential to sftp for quick file downloads, though you could obviously use sftp if you wanted to as well. The basic syntax to use scp secure copy for securely downloading remote files is as follows, replacing user, server, path, and target as appropriate:. Assuming authentication is correct, the target file will immediately start to download to the target destination, offering a percentage completion, download speed, and elapsed transfer time as the file download proceeds.
If the file or path has a space in the name, you can use quotations or escaping on the path like so:. Password: filename. Again, assuming the connection is approve and the login is successful, the remote file will download from the target server to the localhost.
Using ssh for remote file downloads like this is most appropriate for secure transfers which require authentication. Sure you can also downloading files with curl or wget from remote servers, but files accessible with curl and wget tend to be accessible from the outside world as well, whereas ssh and scp requires authentication or a key, and uses 3DES encryption, making it considerably more secure.
Get more of our great Apple tips, tricks, and important news delivered to your inbox with the OSXDaily newsletter. I want to use my mac as a terminal.
I was to send a file from 1 remote system, to another remote system without downloading the file. The problem is i want to have the 2nd remote system forward not download that file to a 3rd remote session. Finally, if there are multiple files with similar naming patterns such as file extensions, wildcards work well:. Name required. The best answers are voted up and rise to the top.
Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. How to download files from a remote Linux Ubuntu Server? Asked 8 years, 4 months ago.
Active 8 years, 4 months ago. Viewed 42k times. Improve this question. Try winscp client on Windows platform, scp on Linux platforms and so on.
0コメント