Cookie Consent by Free Privacy Policy Generator ๐Ÿ“Œ Setting up SSH Keys on Mac for Github

๐Ÿ  Team IT Security News

TSecurity.de ist eine Online-Plattform, die sich auf die Bereitstellung von Informationen,alle 15 Minuten neuste Nachrichten, Bildungsressourcen und Dienstleistungen rund um das Thema IT-Sicherheit spezialisiert hat.
Ob es sich um aktuelle Nachrichten, Fachartikel, Blogbeitrรคge, Webinare, Tutorials, oder Tipps & Tricks handelt, TSecurity.de bietet seinen Nutzern einen umfassenden รœberblick รผber die wichtigsten Aspekte der IT-Sicherheit in einer sich stรคndig verรคndernden digitalen Welt.

16.12.2023 - TIP: Wer den Cookie Consent Banner akzeptiert, kann z.B. von Englisch nach Deutsch รผbersetzen, erst Englisch auswรคhlen dann wieder Deutsch!

Google Android Playstore Download Button fรผr Team IT Security



๐Ÿ“š Setting up SSH Keys on Mac for Github


๐Ÿ’ก Newskategorie: Programmierung
๐Ÿ”— Quelle: dev.to

This tutorial assumes that you have not set up SSH keys in your machine(mac) before. Right now this tutorial only focuses on mac since that's what I am using.

  • The first thing to do is to create ssh keys in your machine. In mac, make sure you are on the home directory i.e: /users/pratikthapa. When you run this, it creates a new key that you can now use.
ssh-keygen -t ed25519 -C [email protected]

Here:
-t ed25519 is the type of encryption we are using. If you machine is not compatible with this encryption, you can also use rsa. Read full documentation here
-C is the contact email associated with the key we are creating.

  • Location:
    After running the command above, it will ask where do you want to save this. Just hit enter.

  • Passphrase:

    • Hit enter for no passphrase.
    • If you enter a passphrase in this step, it provides extra securtiy but github will frequently ask you to enter this exact passphrase during pull/push of repo. You can also save this passphrase in the keychain, so you don't have to enter it every single time.
  • Now that you've created ssh keys, you need to make sure your system's ssh agent knows about it. It's like a wallet that holds multiple identity cards. To do that, in the same terminal, run

eval "$(ssh-agent -s)"

This should print out something like this in the terminal.

Agent pid 12345

If you see this, it means that the machine's ssh agent was able to read/evaluate the ssh key.

  • Now, we need to put the key into the system's ssh agent. Think of it as putting the id in the wallet so that we can present it whenever it is necessary.

First make sure if the ssh-agent exists in your mac already. To see it, run

~.ssh/config

Here, ~ represent the home directory.

if the ssh-agent is not present you should see, zsh: no such file or directory: /Users/pratikthapa/.ssh/config

To make sure that the file does not exists visually, run

ls -a

When you are sure that the .ssh/config is not present, run the following commad to create it.

touch ~/.ssh/config
  • Now the file is created, edit the ssh-agent. Create the wallet to put the id รฐลธหœโ€ฐ
    vim ~/.ssh/config

To add your private key to the ssh agent type

HOST *
  AddKeysToAgent yes
  IdentityFile ~/.ssh/id_ed25519

Here:
/.ssh/ is the folder name
id_ed25519 is the file that was created in step 1.

If you used the passphrase in passphrase section above do the following to add your passphrase to the keychain.

HOST *
  AddKeysToAgent yes
  IdentityFile ~/.ssh/id_ed2
  UseKeychain yes

Then, save and quit vim

  • press esc in your keyboard.
  • type: :wq to write/save and quit out of vim.

Instead of vim you can also use other tools like visual studio code to edit the file.
Open the file using code ~/.ssh/config and follow the same steps above. Or you can simply navigate to the folder, press command + shift + . to see the hideen files and open the config file manually with vs code.

  • Finally add the id into the wallet. Or Add the ssh key into the file we created.
ssh-add ~/.ssh/id_ed25519
  • That's it. Now, you need to navigate to github and add your ssh keys there. Basically, presenting your id to github.

    • Open github.com and login
    • Navigate to settings
    • Click on SSH and GPG keys
    • Click on New SSH key button.
    • On the title, write the machine name or whatever you want to identify where the ssh key is coming from and what kind it is.
    • On the key section paste the ssh key from the machine.
      • First you need to read the file. Run, cat ~/.ssh/id_ed25519.pub. รขลกย รฏยธย Here, .pub means public key.
        • copy the key and paste it.
    • Click Add SSH Key.
    • Github will likely ask for your account password.
      • Enter your password and you are done.
  • To test if the ssh key is working, go to the terminal and type

You should see something like this in the terminal

The authenticity of host 'github.com ***'......
You have successfully authenticated, but GitHub does not provide shell access.

That's it!

I am new to this process, feel free to critique me in the comments if what I am saying is wrong.

...



๐Ÿ“Œ Setting up SSH Keys on Mac for Github


๐Ÿ“ˆ 42.41 Punkte

๐Ÿ“Œ Setting up SSH Keys for Github, GitLab, and Bitbucket in one windows pc


๐Ÿ“ˆ 37.19 Punkte

๐Ÿ“Œ New SSH-Snake malware steals SSH keys to spread across the network


๐Ÿ“ˆ 29.16 Punkte

๐Ÿ“Œ ssh-context - Bash wrapper around ssh which provides you ability to use contexts (as in kubectl) for SSH.


๐Ÿ“ˆ 29.11 Punkte

๐Ÿ“Œ GitHub now supports security keys when using Git over SSH


๐Ÿ“ˆ 26.95 Punkte

๐Ÿ“Œ Security keys are now supported on Github for SSH Git operations


๐Ÿ“ˆ 26.95 Punkte

๐Ÿ“Œ Git SSH Keys: Privates GitHub Repository nutzen (klonen, pushen, etc.)


๐Ÿ“ˆ 26.95 Punkte

๐Ÿ“Œ Verwendung eines SSH-Keys mit GitHub


๐Ÿ“ˆ 26.95 Punkte

๐Ÿ“Œ Github publishes RSA SSH host keys by mistake, issues update


๐Ÿ“ˆ 26.95 Punkte

๐Ÿ“Œ Malicious NPM Packages Exfiltrate Hundreds of Developer SSH Keys via GitHub


๐Ÿ“ˆ 26.95 Punkte

๐Ÿ“Œ Malicious npm Packages Used to Target GitHub Developer SSH Keys


๐Ÿ“ˆ 26.95 Punkte

๐Ÿ“Œ Hackers Deploy Malicious npm Packages on GitHub to Steal SSH Keys


๐Ÿ“ˆ 26.95 Punkte

๐Ÿ“Œ The F-Keys and Special Features Keys on the Mac Keyboard


๐Ÿ“ˆ 24.72 Punkte

๐Ÿ“Œ GitHub: Authentication bypass on gist.github.com through SSH Certificates


๐Ÿ“ˆ 24.68 Punkte

๐Ÿ“Œ No, GitHub's source code wasn't hacked and posted on GitHub, says GitHub CEO


๐Ÿ“ˆ 22.46 Punkte

๐Ÿ“Œ GitHub Honors Class of 2021 with 'GitHub Yearbook' and 'GitHub Graduation' Ceremony


๐Ÿ“ˆ 22.46 Punkte

๐Ÿ“Œ GitHub announces the preview of GitHub Copilot Enterprise and general availability of GitHub Copilot Chat


๐Ÿ“ˆ 22.46 Punkte

๐Ÿ“Œ Deploying a Vite app on GitHub Pages using GitHub Actions with GitHub Secrets


๐Ÿ“ˆ 22.46 Punkte

๐Ÿ“Œ Use iMac as monitor: How to create a Mac to Mac, PC to Mac, or iPad to Mac setup


๐Ÿ“ˆ 20.84 Punkte

๐Ÿ“Œ Use iMac as monitor: How to create a Mac to Mac, PC to Mac, or iPad to Mac setup


๐Ÿ“ˆ 20.84 Punkte

๐Ÿ“Œ Use iMac as monitor: How to create a Mac to Mac, PC to Mac, or iPad to Mac setup


๐Ÿ“ˆ 20.84 Punkte

๐Ÿ“Œ Use iMac as monitor: How to create a Mac to Mac, PC to Mac, or iPad to Mac setup


๐Ÿ“ˆ 20.84 Punkte

๐Ÿ“Œ POSCMS 3.2.10 Setting.php index $cache['setting']['ucssocfg'] privilege escalation


๐Ÿ“ˆ 20.49 Punkte

๐Ÿ“Œ CVE-2023-27229 | TOTOLINK A7100RU 7.4cu.2313_B20191024 Setting /setting/setWanIeCfg upBw command injection


๐Ÿ“ˆ 20.49 Punkte

๐Ÿ“Œ CVE-2023-26978 | TOTOLINK A7100RU 7.4cu.2313_B20191024 Setting /setting/setWanIeCfg pppoeAcName command injection


๐Ÿ“ˆ 20.49 Punkte

๐Ÿ“Œ Anyone See that Post about Pi Zero setting up SSH over HTTP/HTTPS


๐Ÿ“ˆ 19.95 Punkte

๐Ÿ“Œ Device Can Generate Master Keys From Valid or Expired Hotel Keys


๐Ÿ“ˆ 19.51 Punkte

๐Ÿ“Œ Why vim uses hjkl keys as arrow keys


๐Ÿ“ˆ 19.51 Punkte

๐Ÿ“Œ Why vim uses hjkl keys as arrow keys


๐Ÿ“ˆ 19.51 Punkte

๐Ÿ“Œ Titan Security Keys โ€“ Google launches its own USB-based FIDO U2F Keys


๐Ÿ“ˆ 19.51 Punkte

๐Ÿ“Œ Titan Security Keys- Google announced USB-based FIDO U2F Keys


๐Ÿ“ˆ 19.51 Punkte

๐Ÿ“Œ Modifing XKB to disable function keys, Have yet to be successful in disabling any of the function keys at all.


๐Ÿ“ˆ 19.51 Punkte

๐Ÿ“Œ Some YubiKey FIPS Keys Allow Attackers to Reconstruct Private Keys


๐Ÿ“ˆ 19.51 Punkte

๐Ÿ“Œ keys kaspersky total security 2020 keys 360 days


๐Ÿ“ˆ 19.51 Punkte











matomo