Skip to content

Lab 03: Git Linux SSH Script

Miles Cummings edited this page Mar 3, 2024 · 3 revisions

Lab 03: Git + Linux SSH Script

  • On web01, run ssh-keygen -t rsa -C "<new user>". Leave everything default. Now navigate to your public-keys folder for this project, and run cp ~/.ssh/id_rsa.pub . to copy the public key to our Git repo.

Setting up passwordless SSH

  • First, on the client system, navigate to the .ssh folder in your user directory. If it doesn't exist, create it.
  • Run the command ssh-keygen -t rsa to create a new keypair on the client. Hit enter until it creates it (so basically leave everything blank)
  • Now, it's as easy as copying over the SSH key(s) to the server with the command ssh-copy-id user@remotehost. Test it out, and it should let you SSH into that server with no password prompt!

Clone this wiki locally