安装ssh服务器
sudo apt-get install openssh-server
sudo yum install openssh-server
确认是否启动
ps -e|grep ssh
如果未启动则调用
启动: sudo/etc/init.d/ssh start
重启: sudo /etc/init.d/sshresart
root远程登录和端口修改
/etc/ssh/sshd_config
配置项
Port 22333
PermitRootLogin no
免密码登录
1.生成 SSH 密钥对,但不要用 sudo 或 root 用户。提示 “Enter passphrase” 时,直接回车,口令即为空:
ssh-keygen
2.把公钥拷贝到各 Ceph 节点,替换成前面的用户名
ssh-copy-id {username}@node1
网友评论