13.3. Remote Administration Related


Secure shell, remotely login on a machine running the sshd daemon. Once you are logged in you have a secure shell and are able to execute various commands on that computer such as copy files, reboot the computer, just like it was your own GNU/Linux PC.

Or you can use ssh with a full hostname to connect to a remote machine (as in across the internet).


ssh hostname

Connect to a remote system with your current username, you will obviously need the password of the user on the other machine.

ssh username@hostname 

Connect to a remote system with your a different username, you will obviously need the password of the user on the other machine.


Secure copy, part of the ssh package. Allows you to copy files from one computer to another computer, use -r to copy recursively (copy entire directories and subdirectories).

scp's syntax is always

scp machineToBeCopiedFrom machineToBeCopiedTo

Where either machine can be a local directory (on the current filesystem /) or a remote machine. Remote machines are usually machinesFullName:/directory (if you omit the directory part it will just assume the home directory of the username you are logging in with).

The example below copies all files from the current directory (not including any directories), the command will login to “new” using the username of the person currently logged in on the local computer, the files will be copied to the root directory of the remote computer called “new” (which is probably on the LAN):

scp a12264.htm a12264.html b12722.htm backing-up-files.html book1.htm c10407.htm c10694.htm c107.htm c10866.htm c1089.htm c11270.htm c11412.htm c1195.htm c2086.htm c2269.htm c2690.htm c4268.htm c4975.htm c6239.htm c6435.htm c8113.htm c8319.htm c9295.htm c962.htm c9978.htm checking-the-hard-disk.html command-substitution.html compression.html concept-definitions.html contributors.html controlling-processes.html controlling-services.html controlling-the-system.html conventions.html date-time-calendars.html directing-input-ouput.html disclaimer.html doc-index.html duplicating-disks.html feedback.html file-permissions.html finding-information.html finding-packages-tools.html finding-text-within-files.html further-reading.html general-shell-tips.html gnu-free-documentation-licence.html GNU-Linux-Tools-Summary.html graphics-tools.html hard-disk-partition-info.html help.html i12910.htm icon_smile.png index.html internet-specific-commands.html introduction.html legal.html license.html managing-users.html mass-rename.html mathematical-tools.html mini-guides.html miscellaneous.html mounting-and-unmounting.html network-commands.html network-configuration.html other-key-combinations.html performing-more-than-one-command.html references.html remote-administration.html resources-used-to-create-this-document.html rpm.html rsync.html scheduling.html security.html shell-tips.html shutting-down.html some-basic-security-tools.html sources-of-document.html tar.html text-editors.html text-filter-tools.html text-information-tools.html text-manipulation-tools.html text-related-tools.html text-viewing-tools.html the-command-line-history.html the-unix-tools-philosophy.html usage-input-output.html users-and-groups.html using-filesystem.html virtual-terminals.html who-would-not-want-to-read-this-guide.html who-would-want-to-read-this-guide.html wildcards.html working-files-folders.html working-with-ms-dos.html working-with-the-file-system.html x10099.htm x10181.htm x1039.htm x11569.htm x11606.htm x11655.htm x12429.htm x12637.htm x1712.htm x1877.htm x2005.htm x2361.htm x2563.htm x2622.htm x299.htm x3289.htm x335.htm x392.htm x4055.htm x4892.htm x5152.htm x5368.htm x6066.htm x611.htm x6546.htm x662.htm x6823.htm x696.htm x6993.htm x7619.htm x7969.htm x8751.htm x9094.htm x9543.htm new:/

You could also copy files from another computer to another computer. Let's say you are on a computer called “p100”. And you want to copy files (and directories) from “hp166” (in the /tmp directory and anything below that) to “new” and put the files in new's temporary directory. You could do:

scp -r hp166:/tmp new:/tmp

Assuming you were logged in as “fred” you would need passwords for user “fred” on the computers hp166 and new. Add an user_name@ before the computer name to login under a different user name.

For example to perform the above command with user “root” on hp166 and “anon” on new you would type:

scp -r root@hp166:/tmp anon@new:/tmp

To copy from a remote machine to a local computer you simply do things in reverse:

scp remoteMachine:/mystuff/* .

This will copy files on the remote machine in the directory “mystuff” to your local computer.

NoteRemote Machines

Please note that when working with a remote machine you need to have a : (colon) after the machine name even if you want the files in their home directory. Otherwise the command will fail.


Secure ftp, another part of the ssh package. This command is similar to ftp but uses an encrypted tunnel to connect to an ftp server and is therefore more secure than just plain ftp.

The command usage is very similar to ftp (the command-line tool), sftp (once running) uses commands such as help (for help), put (send files to the server), get (download files from the server) and various others, refer to the manual page and internal documentation for further details.

TipGraphical programs

Sometimes its easier to manage files with a GUI, many of these programs do have good GUI equivalents, try searching the internet or sites like Sourceforge or Freshmeat.