Motivations

  • Our computers are powerful, but not always enough for the task at hand.

  • They do not always work 24/7.

  • Some servers (cloud or others) are better equipped for storage and computation ⇒ it would be interesting to be able to use these servers to process our data.

  • These servers are not always physically accessible.

Remote Access

  • Use of SSH (secure shell) protocol and associated tools.

  • Connect from a local workstation to a remote machine and work on it or on a cluster of machines
    ⇒ Shared resources and/or shared time.

  • Often, only the command line is available
    ⇒ our terminal is a window on the remote machine
    ⇒ use of the command line
    ⇒ use a text editor in console mode (Nano, Emacs, Vim, …​).

Remote Access

remote working

Remote Access

remote working emse

Working Remotely

  • Be able to run commands on a remote machine
    → connect to it and run commands.

  • Be able to disconnect from the remote machine without interrupting work in progress
    → launch a program in the background or use a virtual terminal.

  • Schedule jobs for certain times of the day
    → use scheduling utilities.

Connection

  • Use of SSH protocol (ssh ou PuTTY)

    $> ssh prince.charming@remote-computer.far.far.away
    Enter password for prince.charming@remote-computer.far.far.away:
    remote-computer:~$
    ...
    ...
    ^Ctrl+D
    $>
  • Encrypted connection

  • login via password or certificate.

⇒ Demonstration

Virtual Terminal

  • Use tmux or screen commands on the remote machine.

  • Create multiple virtual terminals within a single terminal (multiplexing).

  • Useful for commands providing output that you want to be able to browse later without having to save it.

  • Allows you to disconnect while the process continues.

Scheduling

  • Use of the cron service on the remote machine
    → through the crontab command.

  • Allows you to schedule recurring events.

    $> crontab -l
    # m h  dom mon dow   command
    0 3 * * * /usr/local/bin/crunch.sh >> /var/log/crunch.log 2>&1
    $>
  • crontab -e to edit planning

  • crontab -l to visualize planning

References

‡ : read thoses pages on your own operating system, not on the Internet!