如何配置ssh无密登录

Posted CaoDavidgogo

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了如何配置ssh无密登录相关的知识,希望对你有一定的参考价值。

生成公钥和私钥

ssh-keygen -b 4096 -t rsa
生成的私钥保存在 .ssh/id_rsa , 公钥在.ssh/id_rsa.pub

上传公钥到远程服务器

本地客户端输入 ssh-copy-id user@host
就可以将公钥上传到远程服务器的.ssh/authorized_keys

修改server端/etc/ssh/sshd_config文件, 确保以下参数

RSAAuthentication yes
PubkeyAuthentication yes
这个时候使用ssh user@host就可以不用输入密ma直接登录远程服务器了。

更多:
Setup SSH Keys to Login Linux Without Password

generate SSH key pair with ssh keygen command

understanding ssh key authentication

以上是关于如何配置ssh无密登录的主要内容,如果未能解决你的问题,请参考以下文章

SSH无密登录配置

复制一台虚拟机需要重新配置ssh服务吗

Hadoop运行模式SSH无密登录配置生成公钥和私钥集群配置集群部署规划默认配置文件核心配置文件HDFS配置文件YARN配置文件MapReduce配置文件在集群上分发配置好的Had

haddop完全分布式安装

04设置SSH免密登录

ssh无密登录rsync 服务器与服务器之间同步scp 服务器与服务器之间拷贝