Tag: ssh
All the articles with the tag "ssh".

Git and apt via SSH Reverse Tunnel
Updated:Some customer sites block outbound SSH, and sometimes HTTP/HTTPS too, which breaks git, apt and pip on the remote machine even when everything is otherwise configured correctly. A reverse SSH tunnel piggybacks on the inbound connection you already have to route that traffic back out through your own machine instead…

AWS SSH using SSM
Updated:Access a closed-off AWS EC2 instance over SSH using SSM as a proxy, so no port ever needs to be exposed on the instance. Includes a real-world ssh config entry with a friendly host alias, an AWS profile, and a note on why StrictHostKeyChecking gets disabled.

GCloud SSH Tunnelling
Close port 22 to the internet on GCP and still SSH in, using the Identity Aware Proxy to tunnel through instead of exposing SSH with firewall rules and public/private key pairs.

Github and Deploy Keys
Updated:Pull from several private GitHub repositories on one server by pointing git at a different SSH deploy key using GIT_SSH_COMMAND, core.sshCommand or an ssh config alias.

Kitty Terminfo
If you've started using Kitty as your terminal emulator, you may eventually hit a particularly annoying problem when working over SSH: everything works fine as your normal user, but as soon as you sudo into another account, terminal applications start behaving strangely…

Hashed Known Hosts File
To set known hosts to unencrypted save in Ubuntu, you can modify your SSH configuration by editing the ~/.ssh/config file and adding the line HashKnownHosts no. This will ensure that hostnames are stored in plain text rather than hashed. Make sure to back up your existing configuration before making changes.

Using Paramiko with SSH Config Including ProxyCommand and Includes
This guide documents how to properly use Paramiko with SSH configurations that include: SSH config include directives ProxyCommand for AWS SSM Session Manager Multiple configuration parameters (hostname, user, identity files, etc.) The Problem Paramiko's SSHConfig.parse() has two key limitations: Does not support include directives - If your ~/.ssh/config has lines like include ./config.d/*.conf, paramiko will…


Knock vs. Knockd
I'm working on a project that requires a machine to be contactable on a client's remote network even when its DHCP fails. We've seen an issue where our dev

AWS: SSH using Systems Manager
Systems Manager Systems Manager adds a layer of management to your EC2’s. One particular benefit is being able to SSH into an EC2 without having to open a