配置使用密钥远程登录linux服务器(本地Xshell生成密钥,上传至服务器)
2017-12-27 09:41
721 查看
1.使用Xshell生成密钥,配置使用默认即可,生成待用;
2.修改sshd_config,使用vi /etc/ssh/sshd_config,配置如下:
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
SyslogFacility AUTHPRIV
AuthorizedKeysFile .ssh/authorized_keys
PermitRootLogin without-password
PasswordAuthentication no
ChallengeResponseAuthentication no
GSSAPIAuthentication yes
GSSAPICleanupCredentials no
UsePAM yes
X11Forwarding no
UsePrivilegeSeparation sandbox # Default for new installations.
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
AcceptEnv XMODIFIERS
Subsystem sftp /usr/libexec/openssh/sftp-server
3.将生成好的密钥添加到登录用户根目录下的.ssh目录下的authorized_keys文件中,多个依次添加;
4.使用root用户重启sshd服务,service sshd restart;
2.修改sshd_config,使用vi /etc/ssh/sshd_config,配置如下:
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
SyslogFacility AUTHPRIV
AuthorizedKeysFile .ssh/authorized_keys
PermitRootLogin without-password
PasswordAuthentication no
ChallengeResponseAuthentication no
GSSAPIAuthentication yes
GSSAPICleanupCredentials no
UsePAM yes
X11Forwarding no
UsePrivilegeSeparation sandbox # Default for new installations.
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
AcceptEnv XMODIFIERS
Subsystem sftp /usr/libexec/openssh/sftp-server
3.将生成好的密钥添加到登录用户根目录下的.ssh目录下的authorized_keys文件中,多个依次添加;
4.使用root用户重启sshd服务,service sshd restart;
相关文章推荐
- SecureCRT-转换密钥-Xshell-配置服务-使用xshell登录远程linux服务器
- 本地windows机器和远程Linux服务器之间文件传输 -- Xshell 使用sftp 上传下载文件
- ubuntu使用ssh远程登录服务器及上传本地文件到服务器
- 研发管理笔记(五)-XShell免密钥远程登录服务器
- 配置Linux服务器SSH远程密钥登录
- Xshell配置SSH密钥登录Linux服务器
- 终结者:HTTPS在Tomcat中的使用(一)——生成密钥库文件与配置Tomcat服务器
- 使用Xshell 远程登录搬瓦工vps 服务器帐号
- 腾讯云配置密钥使用putty登录 PuTTY实现Windows向Linux上传文件
- xshell配置ssh使用密钥公钥(publice key)登录
- 配置Linux服务器SSH远程密钥登录 推荐
- Xshell配置SSH密钥登录Linux服务器
- Xshell配置SSH密钥登录Linux服务器
- [整理]配置SSH密钥自动登录远程服务器
- Xshell5配置ssh免密码登录-公钥与私钥登录linux服务器(xshell如何登陆上阿里云服务器)
- 配置IP,putty,xshell远程登录和密钥登录
- xshell使用密钥登录linux服务器
- 跟我一步一步学习:xshell配置之利用密钥登录linux服务器
- Xshell/Secure CRT/PuTTY使用密钥对登录阿里云Linux服务器