completed ssh sec, added git
This commit is contained in:
parent
c1d3ec9af7
commit
b9bddc179a
3 changed files with 89 additions and 0 deletions
|
|
@ -289,3 +289,57 @@ you can find good alias lists online
|
|||
├─ bashrc
|
||||
└─ vimrc
|
||||
#+end_src
|
||||
|
||||
** ssh
|
||||
- working with remote machines
|
||||
- it is good for opening connections
|
||||
- can execute commands remotely, and piping back the output to the calling shell
|
||||
~ssh username@some-ip.com ls -la~
|
||||
|
||||
** ssh keys
|
||||
- typing passwords is inconvenient
|
||||
- use public key encryption
|
||||
- public, private
|
||||
- give public key to the server
|
||||
- whenever you try to authenticate use your private key
|
||||
|
||||
*** create a key
|
||||
~ssh-keygen -o -a -t ed25519~
|
||||
|
||||
- passphrase gives extra protection bc a user of the private key has to give a password
|
||||
|
||||
- creates
|
||||
- private key: id_ed25518
|
||||
- public key: id_ed25519.pub
|
||||
|
||||
*** move the public key to the server
|
||||
#+begin_src bash
|
||||
cat ~/.ssh/id_ed25519.pub | ssh username@ip-address.com tee .ssh/authorized_keys
|
||||
#+end_src
|
||||
|
||||
- at that point ssh will ask you for the password for the server and then it will put the key where you sent it
|
||||
- 'tee' sends standard input both to the screen and to a file (so you can see what is being saved)
|
||||
|
||||
**** ssh-copy-id
|
||||
- does the above but in one command
|
||||
~ssh-copy-id username@ip-address~
|
||||
|
||||
|
||||
** copy files remotely
|
||||
*** scp
|
||||
~scp filename.ext username@ip-address:/path/to/new-filename.ext~
|
||||
|
||||
*** rsync
|
||||
- copy a LOT of files remotely
|
||||
- rsync can continue from interrupts
|
||||
|
||||
|
||||
~rsync -avP /folder/to/copy/from username@ip-address:/folder/to/copy/to~
|
||||
|
||||
** ssh config
|
||||
|
||||
Host hostname
|
||||
User username
|
||||
HostName ip-address
|
||||
IdentityFile ~/.ssh/id_ed25519
|
||||
RemoteForward 9999 localhost:8888
|
||||
|
|
|
|||
34
_subsections/lesson-06.org
Normal file
34
_subsections/lesson-06.org
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
#+title: Lesson 06 | Version Control (git)
|
||||
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="../_share/media/css/missing-semester.css" />
|
||||
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="../_share/media/css/org-media-sass/collapsible.css" />
|
||||
#+HTML_HEAD: <script src="../_share/media/js/collapsible.js"></script>
|
||||
#+OPTIONS: H:6
|
||||
|
||||
* Links
|
||||
#+attr_html: :class links
|
||||
- [[../toc.org][TOC | Missing Semester]]
|
||||
- [[https://www.youtube.com/playlist?list=PLyzOVJj3bHQuloKGG59rS43e29ro7I57J][Playlist: Missing Semester]]
|
||||
- [[https://www.youtube.com/redirect?event=video_description&redir_token=QUFFLUhqbFlfYnViTXFoZm9UUXlSVVJEU0VFUkNKZ3BXd3xBQ3Jtc0tuVlVvNktsdnI1Tlh2NlYtUGpteFRWZE03R2dzRTdldklNZldKaVh4REtTNzRYcUJheXV6S3ZuQWV6c2x0RzhRYjdmMmdhWXVwamt2TWRPYkd3cW8yTFBJNEpJYVc1elFCX09mdDgxRlc3bW50UjlVQQ&q=https%3A%2F%2Fmissing.csail.mit.edu%2F2020%2Fversion-control%2F&v=2sjqTHE0zok][class notes]]
|
||||
|
||||
- Curr: https://youtu.be/2sjqTHE0zok?si=--BTpZVvln-Og5t0
|
||||
|
||||
*** timestamps
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: timestamp
|
||||
:END:
|
||||
|
||||
#+attr_html: :class playlist
|
||||
+ [[https://www.youtube.com/watch?v=2sjqTHE0zok][00:00 - Office Hours]]
|
||||
+ [[https://www.youtube.com/watch?v=2sjqTHE0zok&t=48s][00:48 - Version Control Systems]]
|
||||
+ [[https://www.youtube.com/watch?v=2sjqTHE0zok&t=415s][06:55 - Adhoc Version Control]]
|
||||
+ [[https://www.youtube.com/watch?v=2sjqTHE0zok&t=470s][07:50 - Git Models]]
|
||||
+ [[https://www.youtube.com/watch?v=2sjqTHE0zok&t=900s&pp=0gcJCd0CDuyUWbzu][15:00 - Data Structure]]
|
||||
+ [[https://www.youtube.com/watch?v=2sjqTHE0zok&t=1502s][25:02 - Questions]]
|
||||
+ [[https://www.youtube.com/watch?v=2sjqTHE0zok&t=1587s][26:27 - Demo]]
|
||||
+ [[https://www.youtube.com/watch?v=2sjqTHE0zok&t=1755s][29:15 - Staging Area]]
|
||||
+ [[https://www.youtube.com/watch?v=2sjqTHE0zok&t=2092s][34:52 - Git Log]]
|
||||
+ [[https://www.youtube.com/watch?v=2sjqTHE0zok&t=2826s][47:06 - Branching Merge]]
|
||||
+ [[https://www.youtube.com/watch?v=2sjqTHE0zok&t=3008s][50:08 - Branching Cat]]
|
||||
+ [[https://www.youtube.com/watch?v=2sjqTHE0zok&t=3177s][52:57 - Branching Dog]]
|
||||
|
||||
* notes
|
||||
1
toc.org
1
toc.org
|
|
@ -34,3 +34,4 @@
|
|||
- [[./_subsections/lesson-03.org][Lesson 03 | Editors (vim)]]
|
||||
- [[./_subsections/lesson-04.org][Lesson 04 | Data Wrangling]]
|
||||
- [[./_subsections/lesson-05.org][Lesson 05 | Command-line Environment]]
|
||||
- [[./_subsections/lesson-06.org][Lesson 06 | Version Control (git)]]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue