Lab 3.0: Git & SSH keys
Summary
This lab was very straightforward and a very nice review of git and ssh keys. It's funny to me with the SSH keys because I have done this a few times before when setting up reverse ssh on campus so I can host my website and other utils. I will say the hardest part of this lab was the script just because the wording on it was a little funny but, once I asked a classmate I was rolling at Mach-5
Git
git clone <url>
clones repo to current locationgit commit
commits current changes to repogit commit -m <message>
will change update message in repo after push
git push
pushes changes that have been committed to the repogit add .
adds current directory to repogit pull
pulls all updates from repogit checkout
checks for updates in the repo
SSH
ssh-keygen -t rsa -C "<user>"
will generate a public and private rsa key pairthese keys will be default saved in
/home/<user>/.ssh/id_rsa
THE PUBLIC KEY SAYS id_rsa.pub NEVER SHARE PRIVATE KEY!!!!!
For password less entry to another system
copy the public key over to the
/home/<user>/.ssh/authorized_keys
chmod 700 /home/<user>/.ssh
chmod 600 /home/<user>/.ssh/authorized_keys
shown -R <user>:<user> /home/<user>/.ssh
Last updated