set up an ssh key
Make a key, put it on a server to log in without a password, use a given key, change its passphrase.
networksecurity
-
ssh-keygen -t ed25519make a key pair in ~/.ssh; the passphrase protects it
-
ssh-copy-id NAME@hostput the public key on the server
-
ssh -i ~/.ssh/work_key NAME@hostlog in with a given key
-
ssh-keygen -p -f ~/.ssh/id_ed25519change or remove its passphrase
-
GIT_SSH_COMMAND='ssh -i ~/.ssh/work_key' git clone git@github.com:org/repo.gituse a given key for git
-
chmod 600 ~/.ssh/id_ed25519"permissions too open": only you may read a private key
- Hosts and keys can go in ~/.ssh/config: Host work, HostName, User, IdentityFile.
- Share only the .pub file; the other one stays on your machine.
ssh-keygenssh-copy-idssh
Each has a page in lore: lore ssh-keygen opens it.
check a certificate
See a site's TLS certificate, when it expires and who issued it, or the same for a .pem file.
change permissions of a folder and everything in it
Give a folder, its subfolders and its files the permissions or the owner they need, without making them open to everyone.
check a file's permissions
See who may read, write and run a file or a folder, and why a path is refused.
copy files to and from a server
Copy a file or a whole folder between this machine and another one over ssh.