Upgrade to Pro — share decks privately, control downloads, hide ads and more …

SSH and (not) FTP

SSH and (not) FTP

Confident Coding session - all things SSH plus a mix of other things including VPN, SFTP and SCP.

Lorna Mitchell

October 20, 2012
Tweet

More Decks by Lorna Mitchell

Other Decks in Technology

Transcript

  1. About Me • Lorna Jane Mitchell • Web development consultant

    (mostly PHP) • Trainer, speaker • Author of PHP Master • http://lornajane.net
  2. SSH

  3. What is SSH? • SSH is Secure SHell • used

    for console access to servers • alternative to telnet
  4. SSH Clients For any *nix systems (including mac) use a

    terminal. For windows, use PuTTY http://lrnja.net/QDUNqx
  5. VPN

  6. VPN VPN Virtual Private Network • connects your machine to

    an additional network • gives access to local-only IPs • may need a token as well as credentials • be aware that ALL your traffic may get sent • once connected, no special powers are needed
  7. Public and Private Keys Common to use keys rather than

    username/password with SSH • You generate the keys • There will be a public key named something.pub • And a private key called just something • Share the public key anywhere you need access • Guard the private key with your life
  8. Sending and Storing Keys "Shall I send over my public

    key?" • Public keys are no use without private keys • Attach public keys to email • Or paste into textareas in forms • Private keys are as vital as passwords • Back them up! • Keep a copy somewhere safe
  9. SSH Keys and GitHub Go to edit your profile, and

    choose "SSH Keys" from the left
  10. SSH Config SSH has a config file. We can use

    this to set per-host settings.
  11. Why Not FTP? FTP has been superceeded by more secure

    options. Try SFTP or SCP • both usually available when you have SSH • both handled by FileZilla, Transmit and other popular clients
  12. SFTP SFTP Secure File Transfer Protocol • Secure and more

    robust file transfer than FTP • Uses your SSH credentials • URLs look like: sftp:// ...
  13. SCP SCP Secure CoPy Command-line program - works much like

    cp • Source and Target can be either local or remote • They are of the format username@server:path/to/file scp myfile [email protected]:myfile scp myfile [email protected]:
  14. Some Tips! • Use version control, and deploy everything on

    each release • (as an emergency fallback, back everything up first) • Deploy as much as possible, as often as possible • Use version control ... more on git later!