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. Linux下使用NMON监控、分析系统性能

    一.下载nmon. 根据CPU的类型选择下载相应的版本:http://nmon.sourceforge.net/pmwiki.php?n=Site.Downloadwget http://source ...

  2. Java 验证码工具类

    package com.wuyu.util; import java.awt.Color; import java.awt.Font; import java.awt.Graphics; import ...

  3. win7 32 bit VS2012 OpenCV3.0配置

    今天看CPP基础,想起来之前在vs2012配置opencv3未成功,就忍不住再次配置一... 环境:win7 32bit vs2012 opencv3.0 主要参考这几篇博文:1,2,3 上面的博文已 ...

  4. ios--个人资料修改

    点击进行编辑  (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *) ...

  5. Where与Having的区别

    地球人都知道,Where关键字的作用是过滤,选取符合条件的记录,而Having关键字的作用则是,为聚合结果指定条件.但是,在某些条件下,使用这两者可以得到一样的结果. 比如以下的例子: ) FROM ...

  6. sql语句变量定义和样例

    变量和与常量 1.定义和使用局部变量说明:局部变量是用户可自定义的变量,它的作用范围仅在程序内部.局部变量的名称是用户自定义的,命名的局部变量名要符合SQL Server 2000标识符命名规则,必须 ...

  7. Page 指令的各个属性及其功能

    转载:http://www.cnblogs.com/elleniou/archive/2012/09/09/2678101.html 语法规则: <@%page attribute1=”valu ...

  8. Uncaught TypeError: Cannot read property 'msie' of undefined

    因为图方便,抄了别人写的一个jquerry插件,运行时“var pos = ($.browser.msie && parseInt($.browser.version) <= 6 ...

  9. python webdriver 自动化测试练习 1-- 在线调查

    __author__ = 'Mickey0s' # coding:utf8 from selenium import webdriver from selenium.webdriver.common. ...

  10. Kafka Topic ISR不全,个别Spark task处理时间长

    现象 Spark streaming读kafka数据做业务处理时,同一个stage的task,有个别task的运行时间比多数task时间都长,造成业务延迟增大. 查看业务对应的topic发现当topi ...