Timetombs

泛义的工具是文明的基础,而确指的工具却是愚人的器物

66h / 117a
,更新于 2025-01-05T12:19:33Z+08:00 by   1072b1b

[Linux] SSH

版权声明 - CC BY-NC-SA 4.0

1 ssh

ssh lnh@deb1 -p 22

2 ssh-keygen

# Create RSA private(`id_rsa`) and public(`id_rsa.pub`) key pair.
ssh-keygen -t rsa

3 scp

# Copy file.
scp 1.txt lnh@deb1:/home/lnh/1.txt

4 ssh-copy-id

# Copy `id_rsa.pub` to `~/.ssh/authorized_keys`.
ssh-copy-id -i id_rsa.pub lnh@deb1

5 sshd_config

/etc/ssh/sshd_config

RSAAuthentication     yes
PubkeyAuthentication  yes
AuthorizedKeysFile    .ssh/authorized_keys
上一篇 : [Linux] Script
下一篇 : [Linux] systemd