ssh 配置 主机信任认证
发表于:2024-10-01 作者:千家信息网编辑
千家信息网最后更新 2024年10月01日,sshd 的配置文件 /etc/ssh/sshd_config port 修改sshd的端口 AddressFamily any 支持的IP协议,any表示ipv4和ipv6 ListenAddres
千家信息网最后更新 2024年10月01日ssh 配置 主机信任认证sshd 的配置文件 /etc/ssh/sshd_config port 修改sshd的端口 AddressFamily any 支持的IP协议,any表示ipv4和ipv6 ListenAddress 0.0.0.0 指定监听的地址,0.0,0,0表示任意地址,也可以指定特定的地址 KeyRegenerationInterval 1h 密钥重新生成的间隔 ServerKeyBits 1024 服务器端的密钥长度 LoginGraceTime 2m 登陆的宽容期,(密码等待的时间) PermitRootLogin yes 是否允许root直接登陆 MaxAuthTries 6 密码尝试次数 RSAAuthentication yes 是否使用基于密钥的认证 PubkeyAuthentication yes 是否使用基于密钥的认证 AuthorizedKeysFile .ssh/authorized_keys 密钥存放路径 PasswordAuthentication yes 基于口令认证 UsePAM yes 是否使用pam认证 #Banner none 是否显示banner指定的文件内容,(打印欢迎信息) #PrintMotd yes 是否显示/etc/motd文件的内容 #PrintLastLog yes 是否显示上次登录的信息,一般不显示
白名单和黑名单:黑白名单同时出现,黑名单失效 /etc/hosts.allow /etc/hosts.deny
ssh ssh ip COMMAND 执行命令返回 ssh root@192.168.56.28 ifconfig -l 指定登录用户名 调用远程图形化命令 -X -Y
基于密钥的认证:(互信认证) ssh-keygen -t [rsa|dsa] 指定加密算法 -f /path 指定输出路径 -N 'password' 指定密码 1 生成一对密钥(公钥和私钥) 2 将公钥床送至服务器某用户的家目录下的.ssh/authorized_keys文件中(拥有谁的公钥,谁可以登陆当前主机)
[root@LinuxTest ~]# ssh-keygen -t rsa 创建公钥和私钥 Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): 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: 6b:e9:a2:39:af:0c:0d:e8:95:6f:ff:4a:fb:fc:17:34 root@LinuxTest The key's randomart image is: +--[ RSA 2048]----+ | | | | | | | . . E | |. .o S . . | |. .o. o . | | .. .o .+ . | | oo.+oo . | | ==.==+... | +-----------------+
[root@LinuxTest ~]# scp .ssh/id_rsa.pub root@192.168.56.89:/root/.ssh/authorized_keys 发送公钥到远程服务器 root@192.168.56.89's password: id_rsa.pub 100% 396 0.4KB/s 00:00 [root@LinuxTest ~]# ssh 192.168.56.89 Last login: Tue Dec 20 09:29:41 2016 from 192.168.56.28 [root@ray ~]#
sftp ssh协议类型的ftp [root@LinuxTest ~]# sftp 192.168.56.89 Connecting to 192.168.56.89...
白名单和黑名单:黑白名单同时出现,黑名单失效 /etc/hosts.allow /etc/hosts.deny
ssh ssh ip COMMAND 执行命令返回 ssh root@192.168.56.28 ifconfig -l 指定登录用户名 调用远程图形化命令 -X -Y
基于密钥的认证:(互信认证) ssh-keygen -t [rsa|dsa] 指定加密算法 -f /path 指定输出路径 -N 'password' 指定密码 1 生成一对密钥(公钥和私钥) 2 将公钥床送至服务器某用户的家目录下的.ssh/authorized_keys文件中(拥有谁的公钥,谁可以登陆当前主机)
[root@LinuxTest ~]# ssh-keygen -t rsa 创建公钥和私钥 Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): 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: 6b:e9:a2:39:af:0c:0d:e8:95:6f:ff:4a:fb:fc:17:34 root@LinuxTest The key's randomart image is: +--[ RSA 2048]----+ | | | | | | | . . E | |. .o S . . | |. .o. o . | | .. .o .+ . | | oo.+oo . | | ==.==+... | +-----------------+
[root@LinuxTest ~]# scp .ssh/id_rsa.pub root@192.168.56.89:/root/.ssh/authorized_keys 发送公钥到远程服务器 root@192.168.56.89's password: id_rsa.pub 100% 396 0.4KB/s 00:00 [root@LinuxTest ~]# ssh 192.168.56.89 Last login: Tue Dec 20 09:29:41 2016 from 192.168.56.28 [root@ray ~]#
sftp ssh协议类型的ftp [root@LinuxTest ~]# sftp 192.168.56.89 Connecting to 192.168.56.89...
密钥
认证
公钥
文件
地址
密码
服务器
服务
登陆
信息
内容
名单
命令
用户
路径
黑名单
黑名
生成
登录
主机
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
局域网服务器web界面反应慢
关系型数据库范围
午夜猎魂连不上服务器
网络安全法内容制定
php 随机一条数据库
图书馆数据库的实体联系
德州土豪王软件开发公司
银川企业软件开发
网络安全echo
网络安全窃听
县网络安全和信息化情况通报
2022服务器CPU性能天梯图
网络安全教育平台登录网
网络安全模式蓝屏解决方法
计算机网络技术学英语不
上海软件开发程序员有招聘吗
网络安全用英语怎么回答
区块链是个数据库
云视频服务器租赁费用
qq聊天记录服务器留存
绍兴网络安全教育
数据库值备份表结构
九江市软件开发流程
金东区软件开发方向
华章科技造纸工业互联网平台
网络安全攻防演练服务
服务器网络共享
连接数据库odbc属于
杭州载言网络技术
图数据库深度原理