---
description: docker swarm
---

# 20191119

```
ssh 無密碼登入
```

```
node1:192.168.56.103
node2:192.168.56.106
node3:192.168.56.111
```

```
hostnamectl set-hostname vm1、vm2、vm3
bash
systemctl start sshd
systemctl status sshd
vim /etc/hosts
192.168.56.103 vm1
192.168.56.106 vm2
:wq

ssh-keygen
ssh-copy-id root@vm1
ssh-keygen
ssh-copy-id root@vm2
scp /etc/hosts vm2:/etc/hosts
ping vm1
ping vm2
```

![](https://1005948644-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LZgzp55XQBZ7U2SrFtZ%2F-Lu2F9kvEB6stMlYxmBo%2F-Lu2JOabpQ0jWqhBEMxJ%2Fimage.png?alt=media\&token=55618fd6-bc59-45f0-a195-ba254ea66df8)

