【redhat5.5】ssh服务器的配置

【1】 ssh服务介绍
          1】 为客户机提供安全的Shell环境,用于远程管理
                 默认端口: TCP 22
          2】 主要软件包
                 openssh-server openssh-clients
          3】 sshd                                 服务名 
                 /usr/sbin/ssh                  服务端主程序    
                 /usr/bin/ssh                    客户端主程序
                 /etc/ssh/sshd_config    服务端配置文件
                 /etc/ssh/ssh_config      客户端配置文件
         4】启动sshd服务
                service sshd start


【2】 使用ssh命令远程登录的三种方式
            1】 [root@uplooking ~]# ssh root@10.10.68.251
            2】 [root@uplooking ~]# ssh -l root 10.10.68.251
            3】 [root@uplooking ~]# ssh  10.10.68.251


【3】 使用scp命令远程复制文件/目录
           1】[root@uplooking ~]# scp root@10.10.68.251:/install.log /root
           2】[root@uplooking ~]# scp -r soft root@10.10.68.251:/root
     
【4】 更改验证方式  
          1】允许使用密码登录 
                 PasswordAuthentication yes  
          2】允许使用密钥对验证
                 PubkeyAuthentication yes
                 AuthorizedKeysFile      .ssh/authorized_keys
【5】 客户端生成密钥对并上传服务器
          1】 生成密钥对 
                 # ssh-keygen
                生成:
                id_rsa     私钥  自己保存使用
                id_rsa.pub 公钥  上传服务器
           2】上传公钥
                scp id_rsa.pub root@10.10.68.1:/root/.ssh/authorized_keys
      
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值