ssh no password

local

1
ssh-keygen -t rsa

SSH密钥会保存在home目录下的.ssh/id_rsa文件中.SSH公钥保存在.ssh/id_rsa.pub文件中

upload key 2 server

ssh-copy-id username@remote-server

反过来

server {
listen 80;
server_name blog.guoshuang.com;
charset utf-8;
location / {
root /usr/share/nginx/html/blog;
index index.html index.htm;
}
}