You can use secure copy (scp) with the recursive option (-r):
scp -r /path/to/local/dir user@remotehost:/path/to/remote/dir
Alternatively, I recommend rsync because you can resume transfers if the connection breaks, and it intelligently transfers only the differences between files:
rsync -avz -e 'ssh' /path/to/local/dir user@remotehost:/path/to/remote/dir
You do not need to specify your local hostname to scp a file from your university computer. What you need to do is from your home computer open a terminal (Ctrl + Alt + T) and type the following command:
scp myusername@university_computer:/home/myusername/file.odt /local/destination/path/
where /local/destination/path is the local path on Felix where you ...
@ovc had it right, but there is a syntax error, and my edit got rejected for some reason. You need to have a colon between the user and filepath on the ubuntu side, and on the mac side you need to have the /Users/username/ portion in the filepath. Like so:
scp firstname.lastname@example.org:/path/to/myfile.txt /Users/Jamie/local/path/to/myfile.txt
This assumes you ...
~ is your home directory.
~foo is the home directory of user foo, if such a user exists, or just a directory named ~foo, if that user doesn't exist.
scp ~Desktop/Volenteer.png email@example.com:~j0h/b
~Desktop will expand to home directory of user Desktop, if such a user exists (and it usually does not), or be just ~Desktop (a path which ...
Since you are familiar with Winscp on Windows, I suggest
that you try filezilla
FileZilla Client is a fast and reliable cross-platform FTP, FTPS and SFTP client with lots of useful features and an intuitive graphical user interface.
You can also install with the command line. Open terminal Ctrl+Alt+T and run following command:
sudo apt-get install ...
Permisssion Denied means you are not the root of the server. You just hold an account there. So in that case you need to do this:
sudo scp -r /path2yourFolder/ username@server_Ip:/home/username
This will copy to your home directory on server.
This will also work:
scp -r /path2yourFolder/ username@server_Ip:~/
you can use 'rsync' command which has an option to controlling the file size to be excluding.
rsync -rv --max-size=100m /path/in/local/ server:~/project/
from 'man rsync',
--max-size=SIZE don't transfer any file larger than SIZE
Updated answer : simply exclude the log files with 'rsync' --exclude option as below
rsync -rv --exclude='*.log' --max-...
Have a read through of the GNU documentation for Bash Tilde Expansion (as I should have before my first iteration of this answer).
~/Desktop and ~j0h are doing fundamentally different things, which explains why ~Desktop doesn't work:
A plain ~ is substituted for your current $HOME environment variable, set on login. So ~ resolves to /home/oli for me, and ~/...
You can use ~/.ssh/config to specify the ports to use for the hosts (and for setting many other nice things; check the man page man ssh_config):
When doing this, you have to use the option -3 to scp, which copies the files through your local machine. Otherwise, scp issues the ...
The syntax is:
scp source destination
So this time the source is your local (client) computer and the destination is the remote (server) computer.
If the file you want to send is ~/homecomputer/directory/foobar.txt, then from your local computer you can do:
scp ~/homecomputer/directory/foobar.txt firstname.lastname@example.org:/where/to/put
Check man scp to get ...
You're doing it the wrong way around. Simply use the scp command on the Mac, like this: scp email@example.com:/path/to/myfile.txt /local/path/to/myfile.txt. You may also just use FileZilla which is a graphical client. Connect to your Ubuntu with a URL like sftp://192.168.1.111, of course you need to use the valid IP address.
According to this serverfault.com answer Allow SCP but not actual login using SSH, one currently supported way is by using rssh, which is available from the universe repository:
sudo apt-add-repository universe
sudo apt-get install rssh
To allow SCP, you must uncomment the corresponding line in the /etc/rssh.conf file (plus any other protocols you wish to ...
SSH key authentication is convenient and secure
Please do not hardcode a password into the shellscript, because it is easy for other people to read it.
Login with key authentication to ssh is what you need.
This way you need no password, and it is more secure too. This is particularly important if the computer is visible on the internet. If you don't ...
This error occurred for me when the file already existed in the target location and the existing file had read-only permissions (preventing the file from being overwritten). In my case, I just logged in and deleted the existing file and that corrected the problem.
This can easily happen when connecting to a computer who's host keys in /etc/ssh have changed if that computer was upgraded without copying its old host keys. The host keys here are proof when you reconnect to a remote computer with ssh that you are talking to the same computer you connected to the first time you accessed it.
If the remote computer is ...
User port forwarding
- With guest running, go to VirtualBox settings/network
- Click Port Forwarding
- Name "ssh", protocol TCP, Host port = 3022, Guest port = 22
Then, on the host,
scp -P 3022 myFile localhost:
nullmeta's answer is completely valid, and perhaps nullmeta will edit to provide the clarification you're looking for. I'm posting a separate solution altogether to account for the situation where it may be difficult because of network structure (think NAT firewall) to simply ssh back into the local system.
Say you have two computers, ComputerA and ...
I found no easy solution but you could try to use sshfs the following way:
sshfs -p 6774 user1@host1:/public /tmp/h1
sshfs -p 2211 user2@host2:/data/src /tmp/h2
cp /tmp/h1/files.* /tmp/h2
fusermount -u /tmp/h1
fusermount -u /tmp/h2
Another way could be to use ssh (actually not successfull tested):
ssh user1@host1 "cat /...
Excellent answers above. Additionally, if you need to use a certificate for authentication, you can use the -i flag.
scp -i /path/to/cert firstname.lastname@example.org:/path/to/myfile.txt /Users/Jamie/local/path/to/myfile.txt
You have a pretty fundamental mis-understanding of how scp works.
Assuming "local" is where you want the file to end up, and "remote" is where the file is now, do this:
scp user@remote:/path/to/file.name ~
~ can be replaced with where ever you want the file to go on local.
DO NOT ssh to remote first. When you ssh to remote then run that command you are ...
Spaces in directories or filenames are the natural enemy of a Linux system but can of course be escaped with due diligence. There are 3 possibilities that you could try:
scp [remote username]@192.168.1.X:"'/media/remote_username/photos 4/file.jpg'" .
scp [remote username]@192.168.1.X:"/media/remote_username/photos\ 4/file.jpg" .
scp [remote username]@192....
You could use ~/.ssh/config. It's the per-user configuration file for SSH (and commands based on SSH like scp and sftp). Create it, if it does not exist, and add:
User "User Name Spaces"
User "foo bar"
$ scp test.txt localhost:
foo bar@localhost's password:
(I don't actually have a user ...