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

  • 相关阅读:
    Java读书笔记(2)-输入输出
    Java读书笔记(1)-异常处理
    Photoshop自动导出各尺寸Android和Iphone图标,支持新版Android Studio
    【原创】我的研究生活
    [原创]使用Fiddler抓取手机APP流量--360WIFI
    Federa 7 配置yum 源
    开源自己写的刷票器软件(windows和Android)
    更新linux kernel到3.14.10 LTS版后,virt-manager无法识别qemu hypervisor的问题
    Net Core Identity 身份验证:注册、登录和注销 (简单示例)
    Net Core的API文档工具Swagger
  • 原文地址:https://www.cnblogs.com/xia/p/191377.html
Copyright © 2011-2022 走看看