zoukankan      html  css  js  c++  java
  • Openssh使用

    Install
    -------

    Run the setup program and accept the defaults (all categories).
    This will install the OpenSSH server and client in an appropiate place.

    Configuration
    -------------
    1.  Open a command prompt and change to the installation directory (Program Files\OpenSSH is the default).

    2.  CD into the bin directory.

    3.  Use mkgroup to create a group permissions file. For local groups, use the "-l" switch. For domain groups, use the "-d" switch.
        For both domain and local, it is best to run the command twice (remember to use >>, not >). If you use both, make sure to edit the file to remove any duplicate entires.

          mkgroup -l >> ..\etc\group      (local groups)
          mkgroup -d >> ..\etc\group      (domain groups)

    4.  Use mkpasswd to add authorized users into the passwd file. For local users, use the "-l" switch. For domain users, use the "-d" switch.
        For both domain and local, it is best to run the command twice (remember to use >>, not >). If you use both, make sure to edit the file to remove any duplicate entires.

          mkpasswd -l [-u <username>] >> ..\etc\passwd      (local users)
          mkpasswd -d [-u <username>] >> ..\etc\passwd      (domain users)

        NOTE: To add users from a domain that is not the primary domain of the machine, add the domain name after the user name.
        NOTE: Ommitting the username switch adds ALL users from the machine or domain, including service accounts and the Guest account.

    5.  Start the OpenSSH server.

          net start opensshd

    6.  Test the server. Using a seperate machine as the client is best. If you connect but the connection immediately gets dropped, reboot the machine with the server and try connecting again.

    版本是:OpenSSH_3.8.1p1, OpenSSL 0.9.7d 17 Mar 2004,环境是winxp.。
    这是安装好之后,docs中的quickstarts.txt,基本的意思是,先转到安装目录的bin目录下,然后用mkgroup命令创建用户信息,如果是是本地用户用-l参数,如果是域用户用-d参数,用>>的意思是,在源文件的基础上增加,用>是替换,然后用mkpasswd命令创建用户密码文件,参数同上。
    然后用命令:
    ssh -l username -D port  localhost 就可以了,这儿,端口我用的3306,连得我的mysql。剩下的就是自己测试了!!
    有问题一起讨论!

  • 相关阅读:
    如何自建appender扩展Log4j框架
    在O(1)时间删除链表结点
    My First GitHub
    JAVA序列化和反序列化
    [转]Vim 复制粘帖格式错乱问题的解决办法
    Centos清理内存 内存回收释放及内存使用查看的相关命令
    Spark HA 的搭建
    Ambari安装
    Hadoop HA的搭建
    Hadoop32位和64位的查询
  • 原文地址:https://www.cnblogs.com/xia/p/191377.html
Copyright © 2011-2022 走看看