OpenSSH for Windows: Quick Start Guide
Michael Johnson
youngmug@users.sourceforge.net
Updated 9 July 2004
For detailed instructions, please see readme.txt. If you have questions, please check the readme and the online FAQ before contacting me.
In the descriptions of what to type, I use standard command notation. Items enclosed in [] are optional. Text you need to replace with entries is enclosed in <>.
This document is based in large part on the Quick Start Guide for Network Simplicity OpenSSH on Windows by Mark Bradshaw.
PLEASE READ THROUGH THE FULL README BEFORE YOU ASK FOR HELP. MANY THINGS ARE EXPLAINED IN MORE DETAIL THERE.
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.
Usage and Important Notes
-------------------------
Remember that the CYGWIN OpenSSH utilities are not graphical and are command-line based. Look at PuTTY, SSH Secure Shell, etc for graphical configuration. For more advanced ways to use the programs, look at the manual pages in the documentation directory.
SSH (client program):
ssh <user@servername>
SCP (file copy):
scp <localfilename> <user@servername>:<destinationdirectory>
or
scp <user@servername>:<remotefilename> <localfilename>
or
scp <user@servername>:<remotefilename> <user@otherservername>:<destinationdirectory>
SFTP (ftp):
sftp <user@servername>
NOTE: While regular SSH provides a familiar Windows commandline, SCP and SFTP as well as the passwd file use Unix-style paths. This is due partly to the Unix history of SSH, and to the Cygwin source of the tools.
Paths in SCP and SFTP as well as the home directory listing in passwd use Unix notation. To access directories outside of the OpenSSH directory structure, use the Cygdrive notation described in readme.txt. Further explanation is in readme.txt.
The /home Directory
-------------------
In the passwd file, you will notice that the user's home directory is set as /home/username, with username being the name of the account. In the default install, the /home directory is set to the default profile directory for all users. This is usually C:\Documents and Settings on Windows 2000 and XP, and C:\WINNT\Profiles on Windows NT 4.0. The location of /home can be edited to fit your special requirements by editing a registry key.
To change the Windows directory /home corresponds to, you will need to edit a registry entry under HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/home. The value of the key named "native" is the directory that /home is. If you want all your users to enter in a directory on your machine called F:\Users, change "native" to read F:\Users. By default, each user will then be placed in the directory F:\Users\username, where username is the name of the user account. To place the user directly under f:\Users, change the home directory in passwd to /home.
Troubleshooting
---------------
Troubleshooting tips can be found in the full readme.
关于/home目录:
在Windows 2000 and XP中,/home默认是在C:\Documents and Settings
在Windows NT 4.0中,/home默认是在C:\WINNT\Profiles
要改默认的/home目录要在regedit中进行修改:,
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/home]
"native"="C:\\Program Files\\OpenSSH\\home"
"flags"=dword:0000000a
把"native" 改成你自己的/home 还有就是用户名是默认的登陆目录,比如用户名:linuxborder 那你进入的目录是 /home/linuxborder 你可以通过命令切换到根目录中,也就是/home
分享到:
相关推荐
《OpenSSH for Windows:搭建安全的远程连接》 OpenSSH 是一个开源的 SSH(Secure Shell)工具套件,用于在不同计算机之间建立安全的网络连接。在Windows操作系统中,OpenSSH 提供了与Linux和Unix系统类似的加密...
《OpenSSH for Windows:搭建与使用指南》 OpenSSH,全称Open Source Secure Shell,是SSH协议的开源实现,主要用于在不同系统之间提供安全的远程登录、文件传输等功能。在Windows操作系统上,OpenSSH同样可以提供...
OpenSSH for Windows_6.7.1.2
1,下载openSSH windows版(注:该版本是64位) 2,解压到C:\Program Files\OpenSSH 不要放在别的路径下,官方这样要求的 3,cmd到openSSH路径下 依次执行 1)安装sshd服务 powershell.exe -ExecutionPolicy Bypass...
OpenSSH for Windows 配置指南 OpenSSH 是一个自由和开源的 SSH 服务器实现,它可以在 Windows 平台上运行。在本文档中,我们将详细介绍如何配置 OpenSSH for Windows,以便用户能够安全地连接到远程服务器。 下载...
OpenSSH: A Survival Guide for Secure Shell Handling Publisher: SANS Press Language: English ISBN: 0972427384 Paperback: 123 pages Data: June 2003 Format: CHM Description: The OpenSSH suite of tools ...
OpenSSH for Windows是将开源的Secure Shell (SSH)服务引入Windows操作系统的实现,它允许用户在Windows环境下安全地执行远程命令、传输文件等操作。SSH是一种网络协议,用于加密网络连接,确保数据传输的安全性,...
用于64位windows实现ssh连接的工具,截至2023年4月17日的最新版本v9.2.0.0。 免费下载,免费下载,免费下载,免费下载,免费下载,免费下载,免费下载,免费下载,免费下载,免费下载,免费下载,免费下载,免费下载...
OpenSSH 3.8.1p1 Portable 绿色版 For Windows --- openssh的绿化版本 初次使用: 在bin目录中运行 mkgroup -l >> ..\etc\group 这是加入本地组的命令。 'mkgroup -d >> ..\etc\group 这是加入域组的命令,可不执行...
下载:openssh for windows:https://www.mlssoftware.com/opensshd.html 作用:windows 安装ssh客户端登录服务器,直接通过windows自带的CMD终端远程连接服务器,需要先安装好OpenSSH客户端。 使用:cmd命令行输入:...
ssh程序,版本为OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
openssh for windows 安装包 安装完openssh,会在openssh目录生成linux文件目录格式,默认会传文件在这目录里。。。 scp /var root@192.168.40.131:/share/test/1.txt
Copssh的安装过程简单明了,下载后的安装文件"Copssh_4.1.0_Installer"包含所有必要的组件,如OpenSSH服务器和客户端,以及用于管理这些服务的Copssh控制台。在安装过程中,用户可以选择安装模式,如单用户或多用户...
OpenSSH for Windows: CopSSH windows系统本地git安装
OpenSSH 服务器的配置文件是 /etc/ssh/sshd_config,要启动 OpenSSH 服务,使用 /sbin/service sshd start 命令。要停止 OpenSSH 服务器,使用 /sbin/service sshd stop 命令。如果你想让守护进程在引导时自动启动,...
This OpenSSH for Windows package provides full SSH/SCP/SFTP support. The SSH terminal provides the familiar Windows Command prompt, and retains Unix/Cygwin-style paths for SCP and SFTP. Windows ...
要启动 OpenSSH 服务,使用 /sbin/service sshd start 命令,停止服务则使用 /sbin/service sshd stop 命令。 在重新安装 Red Hat Linux 系统后,任何在它被重装前使用 OpenSSH 工具连接到这个系统上的客户在它被重...
OpenSSH-Win32工具包,最近在进行windows和linux的互通传输文件的工作,找了几天找到的openssh for windows 工具
在Windows操作系统中,OpenSSH(Open Source Secure Shell)是一种安全的网络协议,用于在不同系统之间提供加密的网络服务,尤其是远程登录。OpenSSH服务在Linux系统中非常常见,但同样也可以在Windows环境下运行,...
openssh-portable:便携式OpenSSH,所有Win32-OpenSSH版本和Wiki均在https:github.compowershellWin32-OpenSSH进行管理