In your terminal, type:
scp [email protected]:foobar.txt /local/dir
replacing the username, host, remote filename, and local directory as appropriate.
If you want to access EC2 (or other service that requires authenticating with a private key), use the -i
option:
scp -i key_file.pem [email protected]:/remote/dir/foobar.txt /local/dir
From: http://www.hypexr.org/linux_scp_help.php
Related Posts:
- Can I nohup/screen an already-started process?
- Can you have more than one ~/.ssh/config file?
- How do I grep recursively?
- How do I grep recursively?
- How do I grep recursively?
- How do I use grep to search the current directory for all files having the a string “hello” yet display only .h and .cc files?
- SSH using python script
- How can I exclude directories from grep -R?
- How can I exclude directories from grep -R?
- mysql_config not found when installing mysqldb python interface
- Argument list too long error for rm, cp, mv commands
- Difference between using “chmod a+x” and “chmod 755”
- ssh: Could not resolve hostname [hostname]: nodename nor servname provided, or not known
- Pseudo-terminal will not be allocated because stdin is not a terminal
- X11 forwarding request failed on channel 0
- How to cat <
> a file containing code? - Extract file basename without path and extension in bash
- Given two directory trees, how can I find out which files differ by content?
- mysql_config not found when installing mysqldb python interface
- Diff command along with Grep gives “Binary file (standard input) matches”
- Pseudo-terminal will not be allocated because stdin is not a terminal
- What is the difference between “#!/usr/bin/env bash” and “#!/usr/bin/bash”?
- connect to host localhost port 22: Connection refused
- What does `set -x` do?
- Command to change the default home directory of a user
- Using ls to list directories and their total sizes
- Getting stty: standard input: Inappropriate ioctl for device when using scp through an ssh tunnel
- What does “&” at the end of a linux command mean?
- Can’t remove a directory in Unix
- Syntax error near unexpected token ‘then’
- C fopen vs open
- Restarting cron after changing crontab file?
- How do I write stderr to a file while using “tee” with a pipe?
- cd into directory without having permission
- EC2 ssh Permission denied (publickey,gssapi-keyex,gssapi-with-mic)
- How to configure WP filesystem access in Linux (Ubuntu Server)?
- Copying a large directory tree locally? cp or rsync?
- Can I automatically add a new host to known_hosts?
- Environment variables of a running process on Unix?
- Permission denied (publickey). SSH from local Ubuntu to Amazon EC2 server
- In my /etc/hosts/ file on Linux/OSX, how do I do a wildcard subdomain?
- When does /tmp get cleared?
- Is it normal to get hundreds of break-in attempts per day?
- How to reconnect to a disconnected ssh session
- how to disable SSH login with password for some users?
- SSL Certificate Location on UNIX/Linux
- Is it possible to detach a process from its terminal? (Or, “I should have used screen!”) [duplicate]
- What does ‘set -e’ do, and why might it be considered dangerous?
- Keeping a linux process running after I logout
- Meaning of directories on Unix and Unix like systems
- How to remove empty/blank lines from a file in Unix (including spaces)?
- How to forcibly close a socket in TIME_WAIT?
- How to check if an RSA public / private key pair match
- how do you create an ssh key for another user?
- How can I rename a Unix user?
- “POSSIBLE BREAK-IN ATTEMPT!” in /var/log/secure — what does this mean?
- How to get pid of just started process
- Does getting disconnected from an SSH session kill your programs?
- How to disable everything in crontab -l?
- SSH from A through B to C, using private key on B [closed]
- Show all users and their groups/vice versa
- SSHFS mount that survives disconnect
- Temporarily ignore my `~/.ssh/known_hosts` file?
- How can I fully log all bash scripts actions?
- How to sort ps output by process start time?
- What’s wrong with always being root?
- Hundreds of failed ssh logins
- protocol version mismatch — is your shell clean?
- Amazon Linux: apt-get: command not found
- How do I find all files containing specific text on Linux?
- Where can I find php.ini?
- gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now
- Linux: ‘Username’ is not in the sudoers file. This incident will be reported
- “E: Unable to locate package python-pip” on Ubuntu 18.04 [duplicate]
- How to exclude a directory in find . command
- Explaining the ‘find -mtime’ command
- Creating a new directory in C
- mv: cannot stat error : No such file or directory error
- Linux error while loading shared libraries: cannot open shared object file: No such file or directory
- screen Cannot open your terminal ‘/dev/pts/0’ – please check
- Compile the Fortran program in Windows using gfortran
- How can I set the ‘backend’ in matplotlib in Python?
- Yum fails with – There are no enabled repos.
- Unable to establish SSL connection upon wget on Ubuntu 14.04 LTS
- configure: error: cannot run C compiled programs
- What does set -e mean in a bash script?
- “find: paths must precede expression:” How do I specify a recursive search that also finds files in the current directory?
- Why is my crontab not working, and how can I troubleshoot it?
- Why is “chmod -R 777 /” destructive?
- How to check if a library is installed?
- How do I prevent accidental rm -rf /*?
- What does Virtual memory size in top mean?
- What’s the best way to check if a volume is mounted in a Bash script?
- How do I find the UUID of a filesystem
- Find out symbolic link target via command line
- How to handle security updates within Docker containers?
- Is it possible to make Nginx listen to different ports?
- Is there a proper way to clear logs?
- How do I join two named pipes into single input stream in linux
- How should an IT department choose a standard Linux distribution?