client.
Here is how to use the Windows command-line
FTP client:
Run cmd
(or a terminal program).
Type
ftp
followed by the IPv4 address of where the
FTP server (e.g., babtftp) is running.
For example, on my network, I typed
ftp 10.0.1.11
(but you need to use the IPv4 address that
ipconfig
told you,
which
will be different to mine).
When logging in, use the username 'anonymous' and leave the password blank.
SSH: secure shell (remote login) and secure copy
Using SSH and SCP: https://m.youtube.com/watch?v=rm6pewTcSro
ssh
is stands for secure shell.
ssh
is a way for you to remotely access a computer with full command line access.
To connect to a remote machine, use ssh username@address
where
The default port of ssh
is 22, but for security reasons
many administrators choose to run ssh
on a different port.
To change port that you are connecting to (e.g., port 1234) use the -p
(port) option:
ssh -p 1234 username@address
Once connected, ssh
will prompt you for your password on the remote machine.
Type the password to authenticate and log in.
If successful you will have full command-line access to the remote machine,
just like running a terminal on that machine.
One thing you can do remotely is to find the full path name for a file that
you want to copy securely to your local machine using scp
.
scp
stands for secure copy.
scp
is a way to move files between computers that is more secure than FTP.
It can copy individual files, multiple files using wildcards,
or an entire directory (recursively).
The syntax of scp
is just like the cp
command:
scp fromPath toPath
If you are copying a directory recursively, add the -r
(resursive) option:
scp -r fromDirectoryPath toPath
In either case the toPath can be a filename (which is replaced if it exists)
or a destination directory name.
Either fromPath or toPath (but usually not both) can be a remote file.
The syntax for a remote path is username@address:path
where
username is your account name on the remote machine,
address is the IP address or
DNS name of the remote machine, and
path is the path to the remote file,
either absolute or relative to your home directory on the remote machine.
(Note that if you want to guarantee that path is the name of a directory then
put a trailing /
after it as shown in the examples below.)
If the ssh
port on the remote machine is not the default 22 then
add the -P
(port) option (note the capital letter).
Assuming my remote username is piumarta
,
the remote machine is called server
, and
ssh
is running on port 1234, then
scp -P 1234 piumarta@server:/tmp/data.txt /tmp/
-
copies
/tmp/data.txt
from the remote machine server
into the directory /tmp
on the local machine
scp -P 1234 /tmp/data.txt piumarta@server:data/
-
copies
/tmp/data.txt
from the local machine
to the data
directory located in my home directory on the remote machine server
.
scp -P 1234 -r $HOME piumarta@server:/var/backups/laptop
-
copies my entire home directory recursively to
/var/backups/laptop
on the remote machine server
.
The last example makes a backup of all your personal files.
However, it is not an efficient way to back them up because it will
copy every file — even those that have not changed since the last backup.
Synchronise files/directories: rsync
The rsync
command synchronises two files or directories.
The files or directories can be local or remote.
The syntax is the same as scp
and the -r
option (recursive) is used to copy directories.
One popular use of rsync
is to make backups of important files.
Compared to scp
, the advantage of rsync
is that only changed files are copied
to the destination.
The first time you make a backup using rsync
can take a long time,
but subsequent backups are much faster because they copy only the changes you made to your files.
Even very large files are copied efficiently because only the changed parts are updated.
How to make backups using rsync
: https://m.youtube.com/watch?v=8d5B1JC-1d4
Remote desktop
A remote desktop gives access to the graphical user interface of a remote computer
over the Internet.
A user can interact with the remote system as if they were sitting in front of it.
Keyboard and mouse inputs are transferred from the user's computer to the remote computer,
and screen updates are transferred from the remote computer to the user's computer.
Typical uses include using a workplace workstation when at home or vice versa,
fixing a computer problem remotely,
performing administrative tasks easily, and
demonstrating processes or software applications.
In addition, headless computers that have no monitor, keyboard, or mouse
can easily be accessed remotely by administrators.
Protocols for remote desktop connectivity include:
- Remote Desktop Protocol
-
RDP is built-in to Windows professional and higher versions.
One disadvantage is that only one person can access the controlled computer at once.
When a remote user connects to it, the local user is locked out.
- Virtual Network Computing https://tightvnc.com/
-
VNC is available on (and interoperates between) Windows, MacOS, and Linux.
One advantage is that multiple users can connect to the same remote screen,
and a user sitting at the remote computer is not locked out when remote
users connect.
How to install VNC: https://turbofuture.com/computers/How-to-Install-and-Configure-TightVNC
How to use TightVNC: https://www.youtube.com/watch?v=x9xTyh63Tos
ネットワーク経由でWindows 10を操作する(VNC編): https://www.youtube.com/watch?v=98rQ9J5XE_g