Downloading file using SSH from a server without web access

0 votes

I want to download a file from a server to my laptop with which I just have ssh connection. I'm running OSX and using iterm2 terminal.

Mar 5 in Linux Administration by shubham
• 6,870 points
36 views

1 answer to this question.

0 votes

Run this command in  your terminal:

scp your_username@remotehost.edu:foobar.txt /local/dir

change the username, filename, host, directory as desired. Use the -i option if you plan on using EC2 (or any other service that needs a private key)

scp -i key_file.pem your_username@remotehost.edu:/remote/dir/foobar.txt /local/dir

From: http://www.hypexr.org/linux_scp_help.php

answered Mar 5 by ajs3033
• 7,240 points

Related Questions In Linux Administration

0 votes
1 answer

To attach a file using mail command on Linux

$ echo | mutt -a syslogs.tar.gz admin@domain.org READ MORE

answered Jun 28 in Linux Administration by Upasana
• 8,410 points
21 views
0 votes
1 answer

Not able to access /etc/sudoers.d/python file

I think your system is not allowing ...READ MORE

answered Feb 6 in Linux Administration by Lohit
59 views
0 votes
1 answer

setting a variable output from a bash command

You can use $(command), which in my ...READ MORE

answered Feb 15 in Linux Administration by DareDev
• 6,810 points
66 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How do I set variable if a specific package version is installed in CFEngine?

Here is what you can do.Just use packagesmatching to ...READ MORE

answered Jul 12, 2018 in Other DevOps Questions by Atul
• 10,240 points
65 views
0 votes
1 answer

AWS Simple AD : SSH based key Authentication for Linux instances

You can interact with SimpleAD in the ...READ MORE

answered Aug 29, 2018 in AWS by Priyaj
• 56,160 points
47 views
0 votes
1 answer

how to loop through the content of a file using bash

One of the ways to do it ...READ MORE

answered Feb 15 in Linux Administration by ajs3033
• 7,240 points
59 views
0 votes
1 answer

redirecting stdout and stderr to file using bash

cmd >>file.txt 2>&1 Bash always executes and redirects ...READ MORE

answered Mar 19 in Linux Administration by ajs3033
• 7,240 points
25 views