Skip to content

Instantly share code, notes, and snippets.

@danieldogeanu
danieldogeanu / MakePowerShellRememberSSHPassphrase.md
Last active August 9, 2025 16:42
How to make Powershell remember the SSH key passphrase.

You should not use the Open SSH client that comes with Git for Windows. Instead, Windows 10 has its own implementation of Open SSH that is integrated with the system. To achieve this:

  1. Start the ssh-agent from Windows Services:
  • Type Services in the Start Menu or Win+R and then type services.msc to launch the Services window;
  • Find the OpenSSH Authentication Agent in the list and double click on it;
  • In the OpenSSH Authentication Agent Properties window that appears, choose Automatic from the Startup type: dropdown and click Start from Service status:. Make sure it now says Service status: Running.
  1. Configure Git to use the Windows 10 implementation of OpenSSH by issuing the following command in Powershell:
git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe
  • in settings, create access key id / secret access key
  • then
$ aws configure # enter at least access keys
$ aws emr create-default-roles \
    --region us-east-1
$ aws ec2 create-key-pair \
    --region us-east-1 \
    --key-name Demo \
    --query 'KeyMaterial' \

Strings

String.prototype.*

None of the string methods modify this – they always return fresh strings.

  • charAt(pos: number): string ES1

    Returns the character at index pos, as a string (JavaScript does not have a datatype for characters). str[i] is equivalent to str.charAt(i) and more concise (caveat: may not work on old engines).