`
border
  • 浏览: 206702 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

OpenSSH for Windows: Quick Start Guide

阅读更多
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 for Windows:搭建安全的远程连接》 OpenSSH 是一个开源的 SSH(Secure Shell)工具套件,用于在不同计算机之间建立安全的网络连接。在Windows操作系统中,OpenSSH 提供了与Linux和Unix系统类似的加密...

    openssh for windows--setupssh-7.9p1-1

    《OpenSSH for Windows:搭建与使用指南》 OpenSSH,全称Open Source Secure Shell,是SSH协议的开源实现,主要用于在不同系统之间提供安全的远程登录、文件传输等功能。在Windows操作系统上,OpenSSH同样可以提供...

    OpenSSH for Windows_6.7.1.2

    OpenSSH for Windows_6.7.1.2

    OpenSSH for windows (64bits)

    1,下载openSSH windows版(注:该版本是64位) 2,解压到C:\Program Files\OpenSSH 不要放在别的路径下,官方这样要求的 3,cmd到openSSH路径下 依次执行 1)安装sshd服务 powershell.exe -ExecutionPolicy Bypass...

    OpenSSH_for_Windows_配置.doc

    OpenSSH for Windows 配置指南 OpenSSH 是一个自由和开源的 SSH 服务器实现,它可以在 Windows 平台上运行。在本文档中,我们将详细介绍如何配置 OpenSSH for Windows,以便用户能够安全地连接到远程服务器。 下载...

    OpenSSH: A Survival Guide for Secure Shell Handling

    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

    OpenSSH for Windows是将开源的Secure Shell (SSH)服务引入Windows操作系统的实现,它允许用户在Windows环境下安全地执行远程命令、传输文件等操作。SSH是一种网络协议,用于加密网络连接,确保数据传输的安全性,...

    Openssh for windows64 v9.2.0.0免费下载

    用于64位windows实现ssh连接的工具,截至2023年4月17日的最新版本v9.2.0.0。 免费下载,免费下载,免费下载,免费下载,免费下载,免费下载,免费下载,免费下载,免费下载,免费下载,免费下载,免费下载,免费下载...

    OpenSSH For Windows 绿色便携版 Portable 3.8.1p1

    OpenSSH 3.8.1p1 Portable 绿色版 For Windows --- openssh的绿化版本 初次使用: 在bin目录中运行 mkgroup -l &gt;&gt; ..\etc\group 这是加入本地组的命令。 'mkgroup -d &gt;&gt; ..\etc\group 这是加入域组的命令,可不执行...

    openssh for windows 64位安装包 setupssh-8.4p1-1.exe

    下载:openssh for windows:https://www.mlssoftware.com/opensshd.html 作用:windows 安装ssh客户端登录服务器,直接通过windows自带的CMD终端远程连接服务器,需要先安装好OpenSSH客户端。 使用:cmd命令行输入:...

    ssh.exe OpenSSH-for-Windows-8.1p1

    ssh程序,版本为OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2

    openssh for windows

    openssh for windows 安装包 安装完openssh,会在openssh目录生成linux文件目录格式,默认会传文件在这目录里。。。 scp /var root@192.168.40.131:/share/test/1.txt

    Copssh_4.1.0_Installer

    Copssh的安装过程简单明了,下载后的安装文件"Copssh_4.1.0_Installer"包含所有必要的组件,如OpenSSH服务器和客户端,以及用于管理这些服务的Copssh控制台。在安装过程中,用户可以选择安装模式,如单用户或多用户...

    Git-2.15.0-64-bit.exe

    OpenSSH for Windows: CopSSH windows系统本地git安装

    OpenSSH技术详解:如何配置OpenSSH服务器.docx

    OpenSSH 服务器的配置文件是 /etc/ssh/sshd_config,要启动 OpenSSH 服务,使用 /sbin/service sshd start 命令。要停止 OpenSSH 服务器,使用 /sbin/service sshd stop 命令。如果你想让守护进程在引导时自动启动,...

    OpenSSH_For_Windows_4.3p2

    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技术详解:如何配置OpenSSH服务器.pdf

    要启动 OpenSSH 服务,使用 /sbin/service sshd start 命令,停止服务则使用 /sbin/service sshd stop 命令。 在重新安装 Red Hat Linux 系统后,任何在它被重装前使用 OpenSSH 工具连接到这个系统上的客户在它被重...

    OpenSSH-Win32.zip

    OpenSSH-Win32工具包,最近在进行windows和linux的互通传输文件的工作,找了几天找到的openssh for windows 工具

    windows 下openssh服务安装包

    在Windows操作系统中,OpenSSH(Open Source Secure Shell)是一种安全的网络协议,用于在不同系统之间提供加密的网络服务,尤其是远程登录。OpenSSH服务在Linux系统中非常常见,但同样也可以在Windows环境下运行,...

    Cygwin + OpenSSH FOR Windows的安装配置.docx

    Cygwin + OpenSSH FOR Windows的安装配置 Cygwin + OpenSSH 是一款功能强大且广泛应用的开源软件,主要用于远程连接和安全工具。在 Windows 操作系统中,使用 Cygwin + OpenSSH 可以提供一个非常好的解决方案,受到...

Global site tag (gtag.js) - Google Analytics