forked from tilde.black/docs
Merge pull request 'ssh-config' (#4) from styan/docs:ssh-config into master
This commit is contained in:
commit
17f5e45984
|
@ -42,6 +42,9 @@ Switches:
|
|||
When asked to enter a passphrase, do so. An ssh key without a passphrase is
|
||||
vulnerable if stolen.
|
||||
|
||||
If you want to know how to configure SSH to use a tilde.black specific key
|
||||
see [Configuring SSH](ssh-config.md)
|
||||
|
||||
### Keys used in cron-jobs
|
||||
|
||||
Some keys may be used for automated scripts and are not appropriate to
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
# Configuring SSH
|
||||
|
||||
## Setting a Default Username
|
||||
|
||||
If your username is different on your tilde than on your personal computer,
|
||||
you may want to specify a default username in `~/.ssh/config`.
|
||||
That can be done by adding the following entries:
|
||||
|
||||
Host tilde.black
|
||||
User user
|
||||
|
||||
## Using a Tilde-Specific key
|
||||
|
||||
### Step 1: Generate Your Key
|
||||
|
||||
[Generate a key](ed25519.md), except outputting to a Tilde-specific location.
|
||||
|
||||
mkdir -p ~/.ssh/tilde.black
|
||||
ssh-keygen -a100 -ted25519 -f ~/.ssh/tilde.black/id_ed25519 -C ''
|
||||
|
||||
### Step 2: Authorize Your Key
|
||||
|
||||
If you have yet to [sign up](sign-up.md) to your desired Tilde,
|
||||
send the *public* key (`~/.ssh/tilde.black/id_ed25519.pub`) to the admin.
|
||||
|
||||
If you already have an account, you can authorize your new key by adding it to,
|
||||
or replacing your old key in, `~/.ssh/authorized_keys`.
|
||||
|
||||
$ scp ~/.ssh/tilde.black/id_ed25519.pub user@tilde.black:key.pub
|
||||
$ ssh user@tilde.black
|
||||
tilde$ cat key.pub >> .ssh/authorized_keys
|
||||
tilde$ rm key.pub
|
||||
|
||||
### Step 3: Configure SSH
|
||||
|
||||
To make `ssh(1)` *only* use that key for that tilde, you can add the following
|
||||
lines to `~/.ssh/config`:
|
||||
|
||||
Host tilde.black
|
||||
IdentitiesOnly yes
|
||||
IdentityFile ~/.ssh/tilde.black/id_ed25519
|
||||
|
||||
## See Also
|
||||
|
||||
[SSH over Tor](ssh-over-tor.md)
|
|
@ -111,8 +111,8 @@ onion addresses using the Tor daemon's SOCKS proxy:
|
|||
Host *.onion
|
||||
ProxyCommand /usr/bin/nc -xlocalhost:9050 -X5 %h %p
|
||||
|
||||
Now that `ssh(1)` knows how to connect to onion addresses, a convenient shortcut
|
||||
can be added for tilde.black's onion address:
|
||||
Now that `ssh(1)` knows how to connect to onion addresses,
|
||||
a convenient shortcut can be added for tilde.black's onion address:
|
||||
|
||||
Host tilde.black.onion
|
||||
HostName black6kfjetfuzaeozz7fs53whh7xtd4e27telrf5fg5kgdt5ah5plad.onion
|
||||
|
@ -123,3 +123,5 @@ With those two additions `ssh(1)` can connect to tilde.black's onion address
|
|||
though a much more memorable name:
|
||||
|
||||
ssh user@tilde.black.onion
|
||||
|
||||
For more information about configuring SSH, see [Configuring SSH](ssh-config.md)
|
||||
|
|
|
@ -13,6 +13,7 @@ pages:
|
|||
- Anonymity:
|
||||
- 'Coming soon': 'anonymity.md'
|
||||
- Security:
|
||||
- 'Configuring SSH': 'ssh-config.md'
|
||||
- 'Stronger SSH Keys': 'ed25519.md'
|
||||
theme:
|
||||
name: material
|
||||
|
|
Loading…
Reference in New Issue