Remote Authentication of CVS remote access to CVS through SSH

Source: Internet
Author: User
Tags ssh port

It is difficult to use pserver-based Remote Authentication in CVS. You need to define the server and user group, user name, and password,

Common login formats are as follows:
CVS-D: pserver: cvs_user_name@cvs.server.address:/path/to/cvsroot Login
Example:
CVS-D: pserver: cvs@samba.org:/cvsroot Login

It is not safe, so it is generally used as an anonymous read-only CVS access method. In terms of security, it is better to pass the local account authentication and SSH transmission. You can set the content in the/etc/profile of the client:
Cvsroot =: ext: $ USER@cvs.server.address # port:/path/to/cvsroot

Cvs_rsh = SSH

Export cvsroot cvs_rsh
All local users of all clients can map to corresponding accounts with the same name on the CVS server.

For example:

The CVS server is 192.168.0.3. The cvsroot path above is/home/cvsroot, and the other development client is 192.168.0.4. If Tom has an account of the same name on both machines, it is set from 192.168.0.4:
Export cvsroot =: ext: tom@192.168.0.3:/home/cvsroot
Export cvs_rsh = SSH
Tom can directly access the cvsroot of 192.168.0.3 on 192.168.0.4 (if you have the permission)
CVS checkout project_name
CD project_name
CVS update
...
CVS commit

If the ssh port on the server where CVS is located is not the default 22, or is inconsistent with the default ssh port on the client and the CVS server, it is sometimes set:
: Ext: $ USER@test.server.address # port:/path/to/cvsroot

The error message is as follows:
SSH: Test. server. Address # port: Name or service not known
CVS [checkout aborted]: End of file from server (consult abve messages if any)

The solution is to make a script to specify port redirection (if alias is not available, the file cannot be found ):
Create a/usr/bin/ssh_cvs file. Assume that the ssh port of the remote server is not the default port: 34567.
#! /Bin/sh
/Usr/bin/ssh-P 34567 "$ @"
Then: chmod + x/usr/bin/ssh_cvs
And cvs_rsh = ssh_cvs; export cvs_rsh

Note: Port refers to the SSH port of the corresponding server, not the pserver port dedicated to CVS.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.