• 2004-05-22

    在windows下安装和使用openssh - [谈技术]

    版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明
    http://joecen.yourblog.org/logs/178774.html

    每天都在公司使用putty来运行ssh client连接linux,今天记得好像在windows中也可以安装openssh server,那么就不用再开一个软件,而且还可以使用sftp和scp了。于是决定试试。 1、下载openssh。 可以在此下载2、安装。 安装很简单,就像其它windows下的软件一样,双击即可。安装到大半,会有提示框弹出,说“必须要设置../etc/passwd文件才可以正常运作openssh,详情可以参阅readme.txt或quickstart.txt文件。”不用管它,按确定继续完成安装。安装完后可以看到quickstart.txt文件的内容。 3、配置。 第一、打开一个ms-dos终端,进入openssh/bin目录。(安装完openssh后,发现多了几个在linux中常用的命令,如:ls、mkdir、rm、chmod、chown等,很有亲切感![face01]) 第二、将计算机上的组导入group文件中。这里分两种情况,第一种是本地,第二种是在域中。分别运行-l和-d参数。如果想将两种组都导入,可以先运行-l的参数再运行-d参数的命令。 下面是原文: 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 这是加入本地组的命令。 mkgroup -d >> ..\etc\group 这是加入域组的命令。 第三、 将计算机的用户与其密码导入passwd文件中。与上面的组一样,也是分本地和域两种情况。如果没有该文件或没有导入用户的信息。作为server的话,将不能被登陆,因为没有用户嘛! 下面是原文: 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 这是加入本地用户的命令。 mkpasswd -d [-u <username>] >> ..\etc\passwd 这是加入域用户的命令。 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. 由于我的计算机在家里,不关域的事,所以我只要运行两条命令就可以了。(注意我是在openssh/bin目录下运行的。)

    收藏到:Del.icio.us




    评论

  • 你好,最近也在WINDOWS 安装配置openssh

    首先在自己的机子上(操作系统windows 2000 server,内存256)安装配置成功

    但在另一台机子上却不行(一样的操作系统,内存128)

        试过两次,第一次的错误信息是:找不到系统文件 

             第二次的错误信息是:
  • openssh使用的是windows本身的用户。但使用前必须先用"mkgroup"命令导入windows的组,用“mkpasswd”命令导入windows的用户和密码。而且如果更改了密码的话还要重新导入。这些我上面的文章已经写得很清楚了。
  • 输入的username和password是不是和nt的用户是一样的?

    为什么我输入的密码总是不正确呢?
  • 该提示并不是说不能连接,而是说不能创建/home/Administrator/.ssh目录。ssh每访问一个站点都会检查其.ssh目录中的know_hosts文件,如果文件中没有该站点的信息,就会弹出如你看到的那些文字。这时你只要输入yes,然后再输入192.168.0.1那边的passwd就可以登陆了。

    至于不能
  • 为何无法连接?

    D:\APPS\OpenSSH\bin>ssh -p 22 administrator@192.168.0.1

    Could not create directory /home/Administrator/.ssh.

    The authenticity of host 192.168.0.1 (192.168.0.1) cant be established.

    RSA key fingerprint is c7:96:7e:12:d0:04:d6:2d:18:ee:95

发表评论

您将收到博主的回复邮件
记住我