Skip to content

Commit 64c2b9a

Browse files
committed
ssh to server post update
1 parent 231aaf1 commit 64c2b9a

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

source/_posts/SSH-to-server-without-password.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: SSH to server without password
33
date: 2021-09-15 03:26:00
4-
tags: [ssh, without password, authorized_keys]
4+
tags: [ssh, without password, authorized_keys, PubkeyAuthentication]
55
---
66

77
## The requirement to ssh to server without password
@@ -29,7 +29,13 @@ To ssh without password, you must meet the condition:
2929
1. Copy the content of the publicKey (id_rsa.pub) to server's `~/.ssh/authorized_keys`
3030

3131
```bash
32-
echo "${public key content}" >> .ssh/authorized_keys
32+
echo "${public key content}" >> ~/.ssh/authorized_keys
33+
```
34+
35+
1. Make sure the sshd setting allow publickey authentication
36+
37+
```bash
38+
PubkeyAuthentication yes
3339
```
3440

3541
1. Verify ssh without password

0 commit comments

Comments
 (0)