CVS configuration SSH problem

zhaozj2021-02-16  82

I. Problem: General situation Everyone is a Linux to do server, more articles said, I need to do server, Linux access, because the development machine is Window :-), I tested the WINDOW version OpenSsh No It's easy to use, I don't know if it is still still what is still, there is no success. II. Procedure: 1.Window Install Cygwin Note that admin-> cygrunsrv is used to start the service function, the OpenSSH service requires 2. Install the SSH to install Net-> OpenSsh3. Installation Devel-> CVS 3. Configure SSH-Host-Config -y Tips Cygwin = Enter Ntsec Cygrunsrv -s Sshd IV. Test SSH LocalHost Note that Sshd's cygwin1.dll can only have one (C: / WinNT / SYSTEM32 and C: / Cygwin / bin), otherwise it is not possible to start the service, especially in cases that are installed multiple installed .4.Key Certified WINDOW's key authentication uses the PUTTY PUTTYGEN to generate a Key file. Pay attention to put the contents of the window to Authorized_Keys2, pay attention to the format of each Key! Place the file authorized_keys2 to the $ home / .ssh directory of Cygwin, or add authorized_keys2 to the HOME / .SSH directory of the Linux server (you can implement Log in to Linux SSH service) Use Pageant.exe to load your private key, so that you must use the linux of Linux to create a pair of keys with the openssh of Linux, add public key to Cygwin, using Putty. ..Sssh In Authorized_Keys2, pay attention to the format is a row of each KEY. 5. Server creation source warehouse using WinCVS Remote-> Create a new repository ... In General: Authentication: Select Local Path: You can choose to make six.wincvs set first using Pageant.exe loading private key admin-> Preferences-> General Authentication Select SSH Settings SSH: SSH Client Selection, Tools for PUTTY PLINK.EXE PATH Enter: / Cygdrive / C / CVSROOT Note / CygDrive must / c / cvsroot Represents C: / cvsroot, CVS Warehouse Path Entering Server Address / User Determines User Account Issues I have used normally.

Setting the user by defining the Cygwin system variable as Ntsec, which allows CygWIN to manage login using NT security. However, in order to enable SSHD to accept login, a passwd file is required. This can be done by using the following code:

$ mkpasswd -l> / usr / etc / passwd

$ mkgroup -l> / usr / etc / group

Make sure that you run these commands again every time you create or delete a user - otherwise you will not be synchronized with Windows. In addition, you will need to restart the CygWin SSHD service to read the new Passwd file.

Carefully check to make sure the Passwd file contains the main directory of each user. Otherwise, when the user tries to run commands through the OpenSSH tunnel, OpenSSH will not switch to the user's home directory. This is the most annoying thing.

Note: The mkpasswd command inserts the user guest into the Passwd file. I delete it to eliminate a potential security issue.

转载请注明原文地址:https://www.9cbs.com/read-16003.html

New Post(0)