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

  • 相关阅读:
    python
    python 随机数生成
    PowerShell学习笔记二_变量、Select、Foreach、where
    PowerShell学习笔记一_cmdlet、管道、如何入门
    vscode 配置
    mvn 命令
    Microsoft 365:如何在Word文件中插入另一个不同文档内容或者链接
    Microsoft 365:如何使用Tag来管理在Teams中提到的组
    Microsoft 365:Microsoft Teams 实时字幕助力您打破语言沟通障碍
    2020年SharePoint Saturday _ China, 精彩回顾
  • 原文地址:https://www.cnblogs.com/xia/p/191377.html
Copyright © 2011-2022 走看看