-
2004-05-22
在windows下安装和使用openssh - [谈技术]
版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明
每天都在公司使用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目录下运行的。)
http://joecen.yourblog.org/logs/178774.html
随机文章:
在linux下安装oracle9i--关于在redhat9下安装的补充 2004-06-05使用串口管理linux 2004-06-05将令开机很慢的finding module denpendeneies停掉! 2004-06-05iptables下开放ftp连接 2004-05-17dd 命令的用法 2004-05-09
收藏到:Del.icio.us






评论
首先在自己的机子上(操作系统windows 2000 server,内存256)安装配置成功
但在另一台机子上却不行(一样的操作系统,内存128)
试过两次,第一次的错误信息是:找不到系统文件
第二次的错误信息是:
为什么我输入的密码总是不正确呢?
至于不能
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