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.