git ssh telnet

Source: Internet
Author: User
Tags git clone
1.ssh git installation

sudo apt-get install openssh-server openssh-client git
2. Client Login

git clone ssh://shuyong@192.168.1.100/home/shuyong/project/dailyproject/ 3. Permission configuration here to demonstrate the establishment of User1 User2 Two users simulate two developers respectively,

Build git user, source code is initialized by git user, can treat it as Project Manager and change password separately

Generate Public key

Ssh-keygen-c "Your email address"-t RSA

After the direct carriage return to the end, the middle can not need any settings, the command will generate a pair of asymmetric public/private keys, the default they are stored in:
xp/2003 User: C:/Documents and settings/landing name/.ssh
Vista users: c:/users/Landing name/.ssh

Linux: ~/.ssh below for user1 user2 generate public key, private key

This will result in the/home/user1/.ssh of two files, Id_rsa private keys, and id_rsa.pub public key files

The public key looks about the same.

Under the. SSH folder, the private key is placed in the Id_rsa file, regardless of its contents;

For User2, git users do the same processing, and then their respective directories generate the corresponding files

You then need to provide the User1 user2 respective public key files to the Git user,

2. Add the public key to the Authorized_keys file of the Git user on the Linux server.
can refer to: http://github.com/git-on-windows/rookies
Git user's establishment and setting reference: http://progit.org/book/zh/ch4-4.html

Just add them to the Authorized_keys file (this example adds to the tail of the file):

So the certification is built.

Then use git user to build a library in the/home/git directory project_repos.git/

Then the shipment service/etc/init.d/git-daemon restart

And of course you have to start sshd.

/etc/init.d/sshd start

User1 connection (this test will be porject_repos.git to Repos.git, this section, can be ignored)

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.