<commit_before>---
layout: post
title: Mac SSH agent not loading identity on login
excerpt: This has been annoying me for a while now, but I've been putting off investigating it. Until now...
---

So, what's your :cow: ?

For both work and my personal projects, I often use SSH agent forwarding. For those of you that don't know what this is,
basically it means that your local SSH key is forwarded in a secure manner to the remote server that you're connecting
to and allows you to connect onto other servers using your local SSH identity without manually copying your keys around.

An example use case is that you want to perform a deploy on a remote server, but in order to perform the deploy you
need to pull from Github on the remote server and because it's a private repo that you're pulling from, you'll need to
present your SSH key to Github.

An easy (but insecure) way to do this is to copy your local SSH key to the server where you want to deploy to and
then SSH to the server and then pull from Github using your "copied" SSH identity. Now, whilst this might work, it's
wrong for a couple of reasons. Essentially it's bad practise, due to the security risks that it creates. So you've
been warned! - Do NOT do this! :rage:
<commit_msg>Change emoji in post and add a little explanation :wink:<commit_after>---
layout: post
title: Mac SSH agent not loading identity on login
excerpt: This has been annoying me for a while now, but I've been putting off investigating it. Until now...
---

So, what's your :cow2:?

FYI: `(cow == beef) && (beef == problem)` :wink:

For both work and my personal projects, I often use SSH agent forwarding. For those of you that don't know what this is,
basically it means that your local SSH key is forwarded in a secure manner to the remote server that you're connecting
to and allows you to connect onto other servers using your local SSH identity without manually copying your keys around.

An example use case is that you want to perform a deploy on a remote server, but in order to perform the deploy you
need to pull from Github on the remote server and because it's a private repo that you're pulling from, you'll need to
present your SSH key to Github.

An easy (but insecure) way to do this is to copy your local SSH key to the server where you want to deploy to and
then SSH to the server and then pull from Github using your "copied" SSH identity. Now, whilst this might work, it's
wrong for a couple of reasons. Essentially it's bad practise, due to the security risks that it creates. So you've
been warned! - Do NOT do this! :rage:

{'fraction_non_alphanumeric': 0.047508690614136734, 'fraction_numerical': 0.0003862495171881035, 'mean_word_length': 4.029126213592233, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6646869', 'n_tokens_mistral': 697, 'n_tokens_neox': 645, 'n_words': 463}