1. 1、ssh服务生成新的公钥和私钥[root@rhel6_80 ~]# ssh-keygen
  2. Generating public/private rsa key pair.
  3. Enter file in which to save the key (/root/.ssh/id_rsa):
  4. Enter passphrase (empty for no passphrase):
  5. Enter same passphrase again:
  6. Your identification has been saved in /root/.ssh/id_rsa. #私钥存放地址
  7. Your public key has been saved in /root/.ssh/id_rsa.pub. #公钥存放地址
  8. The key fingerprint is:
  9. 3e:ff:b3:68:de:e7:06:1b:fb:21:49:44:bb:38:76:e3 root@rhel6_80
  10. The key's randomart image is:
  11. +--[ RSA 2048]----+
  12. | . |
  13. | . . |
  14. | o |
  15. | o . |
  16. | S + = |
  17. | . . =oo |
  18. | o E=. |
  19. | o.o+.o. |
  20. | o+.+Bo |
  21. +-----------------+
  22. [root@rhel6_80 ~]# ls .ssh/
    id_rsa id_rsa.pub known_hosts #id_rsa私钥 id_rsa.pub公钥。


  1. [root@rhel6_80 ~]# ssh-copy-id -i /root/.ssh/id_rsa.pub root@192.168.3.84 #将公钥发布给84服务器后,80再次连接84就不需要再输入密码
  2. [root@rhel6_80 ~]# ssh 192.168.3.84
    Last login: Thu May 19 20:33:21 2016 from 192.168.3.130
    警告!哈哈哈哈哈哈
    PATH=/root/:/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin #无需输密码连接成功
    [root@rhel6_84 ~]#
  1. [root@rhel6_80 ~]# ls
  2. aa.sh cc.sh fail2ban-0.8.14.tar.gz install.log ss.sh 公共的 视频 文档 音乐
  3. anaconda-ks.cfg dd.sh hh.sh install.log.syslog xx.sh 模板 图片 下载 桌面
  4. [root@rhel6_80 ~]# tar xf fail2ban-0.8.14.tar.gz
  5. [root@rhel6_80 ~]# cd fail2ban-0.8.14
  6. [root@rhel6_80 fail2ban-0.8.14]# python -V
    Python 2.6.6
    [root@rhel6_80 fail2ban-0.8.14]# python setup.py stall
  7. **************
  8. [root@rhel6_80 fail2ban-0.8.14]# cp files/redhat-initd /etc/init.d/fail2ban
    [root@rhel6_80 fail2ban-0.8.14]# chkconfig --add fail2ban #添加fail2ban 开机自启
    [root@rhel6_80 fail2ban-0.8.14]# chkconfig --list fail2ban
    fail2ban 0:关闭 1:关闭 2:关闭 3:启用 4:启用 5:启用 6:关闭
  9. [root@rhel6_80 fail2ban-0.8.14]# cd /etc/fail2ban/
    [root@rhel6_80 fail2ban]# ls
    action.d fail2ban.conf fail2ban.d filter.d jail.conf jail.d

4、fail2ban 设置
  1. [root@rhel6_80 fail2ban]# fail2ban-client status #查看当前fail2ban设置

5、SCP远程拷贝


6、xinetd 进程守护程序
  1. [root@rhel6_80 ~]# yum -y install xinetd
  2. [root@rhel6_80 ~]# vim /etc/xinetd.conf #配置文件
  3. [root@rhel6_80 ~]# yum -y install telnet-server tftp-server rsync #安装测试用程序,测试被xinetd管理的程序
  4. # default: off
    # description: The rsync server is a good addition to an ftp server, as it \
  5. [root@rhel6_80 ~]# vim /etc/xinetd.d/rsync #启动rsync服务
    # allows crc checksumming etc.
    service rsync
    {
    disable = no #这里改成no,表示启动xinetd
    flags = IPv6
    socket_type = stream
    wait = no
    user = root
    server = /usr/bin/rsync
    server_args = --daemon
    log_on_failure += USERID
  6. [root@rhel6_80 ~]# service xinetd restart #启动xinetd服务
    停止 xinetd: [失败]
    正在启动 xinetd: [确定]
  7. [root@rhel6_80 ~]# netstat -anptu |grep 873 #检测是否正常监听873端口,有标示rsync服务正常启动。
    tcp 0 0 :::873 :::* LISTEN 3945/xinetd


3、SSH高级服务的更多相关文章

  1. SSH高级服务

    SSH端口转发 SSH 会自动加密和解密所有 SSH 客户端与服务端之间的网络数据.但是,SSH 还能够将其他 TCP 端口的网络数据通过 SSH 链接来转发,并且自动提供了相应的 加密及解密服务.这 ...

  2. SSH安全服务

    ssh安全服务     client \ sever     ssh: secure shell, protocol, 22 / tcp, 安全的远程登录, 基于RSA或DSA实现身份认证     两 ...

  3. Linux实战教学笔记05:远程SSH连接服务与基本排错(新手扫盲篇)

    第五节 远程SSH连接服务与基本排错 标签(空格分隔):Linux实战教学笔记-陈思齐 第1章 远程连接LInux系统管理 1.1 为什么要远程连接Linux系统 在实际的工作场景中,虚拟机界面或物理 ...

  4. systemctl status ssh.service 服务重启出现报错

    Case: ubuntu在从Ubuntu 16.04 LTS 升级到18.04 的时候,执行 do-release-upgrade -d 后,发现ssh无法登陆服务器, Solution: 1.通过s ...

  5. (转)远程SSH连接服务与基本排错

    远程SSH连接服务与基本排错 原文:https://www.cnblogs.com/chensiqiqi/p/6224474.html#top 1.1 为什么要远程连接Linux系统 在实际的工作场景 ...

  6. Linux SSH,FTP服务配置

    CentOS-6.4-x86_64-minimal 0.网卡配置 参考:Linux系统\Centos没有网卡eth0配置文件怎么办? - http://jingyan.baidu.com/articl ...

  7. 远程SSH连接服务与基本排错

    为什么要远程连接Linux系统?? 在实际的工作场景中,虚拟机界面或物理服务器本地的窗口都是很少能够接触到的,因为服务器装完系统后,都要拉到IDC机房托管,如果是购买了云主机,更碰不到服务器本地显示器 ...

  8. 安装,配置,启动FTP,SSH,NFS服务

    1.安装,配置,启动FTP服务 sudo apt-get install vsftpd 修改vsftpd的配置文件/etx/vsftpd/.config,将下面几行前面的“#”去掉 #local_en ...

  9. Ubuntu13.10:[3]如何开启SSH SERVER服务

    作为最新版本的UBUNTU系统而言,开源,升级全部都不在话下.传说XP已经停止补丁更新了,使用UBUNTU也是一个很好的选择.ubuntu默认安装完成后只有ssh-agent(客户端模式),宾哥百度经 ...

随机推荐

  1. js日期重写

    Date.prototype.Format = function (fmt) { var o = { "M+": this.getMonth() + 1, //月份 "d ...

  2. ios控制器生命周期详解

    #import "MyOneViewController.h" @interface MyOneViewController () @property (nonatomic, st ...

  3. JQuery的一些简单操作01

    一.JQuery的隐藏和显示效果 1.hide/show/toggle hide隐藏效果,hide(1000)括号里面跟毫秒,show显示效果同样后面括号可以有数值,toggle开关按钮,交替作用隐藏 ...

  4. 关于变量和函数前&符号的作用

    首先看一下下面的例子 <?php $a="val1"; $b="val2"; $a=&$b; echo $a."<br/>& ...

  5. Javascript 事件对象(五)事件捕获

    事件捕获: <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" c ...

  6. Objective-C汇总

    Objective  C(20世纪80年代初) 一.OC语言概述 .1985年,Steve  Jobs成立了NeXT公司 .1996年,12月20日,苹果公司宣布收购了NeXT  softwar ...

  7. Android 学习第16课,java 包、类等相关的一些基础知识

    1.建议将类放在包中,不要使用无名包 2.建议包名都用小写单词组成,不要用大写 3.建议包名用“域名的倒写.项目名.模块名”的形式,以确保包名的唯一性 注意:类变量与实例变量.类方法与实例方法的区别 ...

  8. android 查看MD5、sha1值命令

    cmd 进去keystore 文件所在目录 keytool -list -v -keystore xxx.keystore debug.keystore 默认目录:C:\Documents and S ...

  9. 《深入浅出Node.js》第8章 构建Web应用

    @by Ruth92(转载请注明出处) 第8章 构建Web应用 一.基础功能 请求方法:GET.POST.HEAD.DELETE.PUT.CONNECT GET /path?foo=bar HTTP/ ...

  10. Winform绑定数据源的几种方式?

    第一种:DataSet ds=new DataSet (); this.dataGridView1.DataSource=ds.Table[0]; 第二种:DataTable dt=new DataT ...