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。剩下的就是自己测试了!!
    有问题一起讨论!

  • 相关阅读:
    C#对HTTP数据还原
    Nancy.Host的Web应用
    Deep Learning
    业务规则引擎扩展模块
    LB 负载均衡的层次结构(转)
    主要的核心思想是取cookie然后发查询请求,不需要浏览器做代理(转)
    关于java mail 发邮件的问题总结(转)
    使用ping钥匙临时开启SSH:22端口,实现远程安全SSH登录管理就这么简单(转)
    利用Javamail接收QQ邮箱和Gmail邮箱(转)
    android ListView隐藏FooterView(headerView)
  • 原文地址:https://www.cnblogs.com/xia/p/191377.html
Copyright © 2011-2022 走看看