root@ceph01:~# ssh-keygen Generating public/private rsa key pair. Enter file inwhich to save the key (/root/.ssh/id_rsa): Created directory '/root/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.ssh/id_rsa.pub. The key fingerprint is: 58:47:8d:56:db:90:aa:7c:be:8a:22:a6:d6:e4:c3:8d root@ceph01 The key's randomart image is: +--[ RSA 2048]----+ | .+o. | | .o o+ | | ..... . | | o .. | | ..S. | | . o . | | = o o | | .oE.. . . | |oo .... .... | +-----------------+ root@ceph01:~# ssh-copy-id ceph01 Warning: Permanently added 'ceph01' (ECDSA) to the list of known hosts. root@ceph01's password: Now try logging into the machine, with "ssh 'ceph01'", and check in: ~/.ssh/authorized_keys to make sure we haven't added extra keys that you weren't expecting.
编辑ceph配置文件
1 2 3 4
root@ceph01:~# vi /etc/ceph/ceph.conf fsid = 53eaacda-3558-4881-8e35-67f3741072dd mon initial members = ceph01 mon host = 192.168.100.101