From: Emil Williams Date: Fri, 18 Apr 2025 16:46:35 +0000 (-0600) Subject: init X-Git-Url: https://git.xolatile.top/?a=commitdiff_plain;h=894bf0d9e53cf0500cf992104d88fbcaa6c3dd70;p=emil-ssh.git init --- diff --git a/README.md b/README.md index adb5814..8d8c0a9 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,12 @@ SSH is a connection tool. You need a public and private key generated by a command. +This key is used for facilitating connections. SSH has several important files: - .ssh/config <- On this later -- .ssh/key (private) .ssh/key.pub +- .ssh/key (a private key, don't send this to anyone for any reason), and .ssh/key.pub (a PUBlic key, distribute as you wish) - .ssh/known_hosts <- Records of prior connections, may be invalidated or deleted . .ssh/authorized_keys <- list of public keys (literally cat of the .pub) allowed to SSH into this user, never provided by default @@ -29,7 +30,7 @@ Enter same passphrase again: Your identification has been saved in /home/emil/.ssh/id_ed25519 Your public key has been saved in /home/emil/.ssh/id_ed25519.pub The key fingerprint is: -SHA256:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA emil@box +SHA256:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA emil@box # obvious this will be your user@host The key's randomart image is: +--[ED25519 256]--+ |AAAAAAAAAAAAAAAAA| @@ -53,11 +54,17 @@ SSH URIs look like this: ### Making a connection ### +```sh ssh user@box -i ~/.ssh/key # as in the private key, not the public -> Blah Blah Blah new connection will be added to .ssh/known_hosts -> say YES. +-- Blah Blah Blah new connection will be added to .ssh/known_hosts +-- say YES. +``` + +If you encounter a screaming message about a potential Man In The Middle, it is usually caused by some dramatic change to the remote system. +If you changed the remote sshd configuration or suspect that is the case, then it would be generally safe to ignore the alert. -You can see the actual ssh(1) for exact usage and what else you can do. +You can see the actual ssh(1) for exact usage and what else you can +do. ### Config ### @@ -67,13 +74,13 @@ Lets say your key is called xolatile, this would be a sane configuration for git ```yaml Host git.xolatile.top - IdentityFile ~/.ssh/model + IdentityFile ~/.ssh/xolatile User git ``` By default ssh uses your user (which is also the default connection user) to find the default public key. -hence, when you ```ssh somehost``` ssh will first look at your current user, and then look for and use ```~user/.ssh/user``` unless specified via an option or by config. +hence, when you ```ssh somehost``` ssh will first look at your current user, and then look for and use the public key in ```~user/.ssh/user``` unless specified via the ```-i``` option or by your config file. You can also do wildcards, this is covered further in the ssh_config(5) manual page.