zoukankan      html  css  js  c++  java
  • Fedora 开启 ssh

    Fedora 17 已经安装好openssh server了 不用再装
    不过默认无开启

    首先su root
    1.开启ssh服务
    # systemctl start sshd.service

    2.随系统一起启动服务

    # systemctl enable sshd.service

    在terminal 中输 setup 对防火墙 添加22 端口

    3.开启防火墙22端口

    # iptables -I INPUT -p tcp --dport 22 -j ACCEPT


    测过ok

    1、在root权限下,修改ssh配置文件:vi /etc/ssh/ssh_config

    将一下三个注释去掉,即去其前的“#”号:

    RSAAuthentication yes

    PasswordAuthentication yes

    Port 22

    2、启动SSH服务:service sshd start

    3、测试是否安装成功:ssh 192.168,.253.18    #对方ip

    出现: Are you sure you want to continue connecting (yes/no)? yes  #输入yes
    出现:root@192.168.253.18's password:            #输入对方对应角色密码
    提示:Last login: Sun Nov 18 14:34:41 2012 from 192.168.253.20  #登录成功

    4、操作完成后一定要退出登录:logout    #忘记退出的后果是,所有命令行操作都在对方机器上!

    以下为免密码登录配置:

    1、生成密钥: ssh-keygen -t rsa

    提示:

    The key's randomart image is:
    +--[ RSA 2048]----+
    |          +*++..|
    |        . ooo.. |
    |        +  .o . |
    |      + o .  + o|
    |      . S .  o *.|
    |      .    o .E+|
    |            .  |
    |                |
    |                |
    +-----------------+

    2、密钥传给对方机器: ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.253.18
    3、再重新登录即可不用密码:ssh 192.168.253.18

    PS:如果链接对方主机提示PORT 22 connection refused提示,可在对方主机上重新启动ssh服务:service sshd start

  • 相关阅读:
    MNIST手写字母识别(二)
    MNIST手写字母识别(一)
    多元线性回归问题(Tensorflow 求解)
    单变量线性回归问题(TensorFlow实战)
    TensorBoard可视化初步
    TensorFlow的基本运算
    NumPy科学计算库
    tensorflow使用Session模块时报错:AttributeError: module 'tensorflow' has no attribute 'Session',已解决
    Python 第一个爬虫
    Python(列表)
  • 原文地址:https://www.cnblogs.com/beceo/p/4104249.html
Copyright © 2011-2022 走看看