| $ ssh user1@ssh.it-c.dk | # invoke the program |
|
The authenticity of host 'ssh.it-c.dk ([ip-number])' can't be established.
DSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx. Are you sure you want to continue connecting (yes/no)? yes | # this step is only needed if this is the first time you run ssh against ssh.it-c.dk, or when ssh.it-c.dk changes its key fingerprint. By answering yes you add the fingerprint to ~/.ssh/known_hosts2. |
| user1@ssh.it-c.dk's password: | # you type the password |
|
$ hostname ssh.it-c.dk | # check that you is now on the server |
| $ exit | # end the remote login |
|
$ ssh-keygen -d
Generating public/private dsa key pair. | # invoke the key generation program asking for dsa type encryption |
| Enter file in which to save the key (/home/user1/.ssh/id_dsa): | # accept default location |
| Enter passphrase (empty for no passphrase): | # just press return |
|
Enter same passphrase again:
Your identification has been saved in /home/user1/.ssh/id_dsa. Your public key has been saved in /home/user1/.ssh/id_dsa.pub. The key fingerprint is: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx user1@[your client] | # press return again, now the key is created |
|
$ scp .ssh/id_dsa.pub user1@ssh.it-c.dk:
user1@ssh.it-c.dk's password: | # copy the public key to the server, you must still enter your password |
|
$ ssh user1@ssh.it-c.dk
user1@ssh.it-c.dk's password: | # login to the server, you must still enter your password |
| $ mkdir -p .ssh | # create the .ssh directory if missing |
| $ chmod go-rwx .ssh | # make sure the directory is for your eyes only |
| $ cat id_dsa.pub >> .ssh/authorized_keys2 | # append the clients public key to the authorized list. Note the underscore in the file name authorized_keys2. |
| $ rm id_dsa.pub | # remove the copy of the public key |
| $ chmod go-rwx .ssh/authorized_keys2 | # make sure the authorized list is for your eyes only |
| $ exit | # leave the remote login |
| $ ssh user1@ssh.it-c.dk | # invoke the program |
|
$ hostname ssh.it-c.dk | # check that you is now on the server |
| $ exit | # end the remote login |
| Run putty.exe |
| Enter Hostname: ssh.it-c.dk |
| Select Protocol: SSH |
| Click Open |
| You will probably first get a PuTTY Security Alert Window where you are asked to confirm that you trust the server's host key with the given key fingerprint. Click Yes. |
| Then you should get a terminal window in which you are asked to login with user name and password. |
| After that you can type hostname and you should get ssh back. |
| Close the terminal window by typing exit, which also exits PuTTY. |
| Run puttygen.exe |
| Click Generate |
| Move the mouse around as long as the progress bar indicates to generate some entropy. |
| Copy the Public Key into Notepad. Important:Make sure to add a trailing linebreak after the key. Otherwise concatenating several keys will not put them each on their own line. Finally save it in H:\Putty\identity.pub. |
| Click Save to save the private key in H:\Putty\identity. Accept the warning about no passphrase. |
| Exit the PuTTY Key Generator. |
| Run putty.exe |
| Session tab, Hostname: ssh.it-c.dk |
| Session tab, Protocol: SSH |
| Session tab, Saved Sessions - text box: ssh.it-c.dk |
| Connection tab, Auto-login username: user1 |
| SSH tab, Private key file: H:\Putty\identity |
| Session tab, Click Save. |
| Test the new session by double clicking it on the list of saved sessions. You should get a terminal window and be asked for a password. Type exit to close the terminal window again. |
| H:\>cd Putty | # Using a Command Prompt Window, go to the location of the key files |
|
H:\Putty>pscp identity.pub user1@ssh.it-c.dk:
user1@ssh.it-c.dk's password: | # Copy the public key to the server, you must still enter your password |
|
H:\Putty>putty
Double-click on ssh.it-c.dk Sent username "user1" Server refused our public key. user1@ssh.it-c.dk's password: | # Login to the server. You must still enter your password. |
| $ mkdir -p .ssh | # create the .ssh directory if missing |
| $ chmod go-rwx .ssh | # make sure the directory is for your eyes only |
| $ cat identity.pub >> .ssh/authorized_keys | # append the client's public key to the authorized list |
| $ rm identity.pub | # remove the copy of the public key |
| $ chmod go-rwx .ssh/authorized_keys | # make sure the authorized list is for your eyes only |
| $ exit | # leave the remote login |
|
H:\Putty>plink ssh.it-c.dk
Sent username "user1" | # Login to the server. |
|
$ hostname ssh.it-c.dk | # check that you is now on the server |
| $ exit | # end the remote login |
| $ cd ~user1 | # begin at a well-defined place |
| $ mkdir cvsroot | # create the directory |
| $ chgrp group1 cvsroot | # make sure the directory belongs to the common group |
| $ chmod g+s cvsroot | # make sure everything below will belong to the common group |
| $ cvs -d ~user1/cvsroot init | # let CVS create its own files |
| $ chmod -R g+w cvsroot | # give group permission to write. Only neccessary because IT-C's filesystem is xfs. |
| $ cat ~user1/cvsroot/CVSROOT/modules | # verify that CVS has created its files |
| $ cd ~user1 | # begin at a well-defined place |
| $ mkdir pacman | # create a temporary folder for the initial files |
| $ cd pacman | # go there |
| $ touch readme.txt | # create an initial file |
| $ cvs -d ~user1/cvsroot import -m "" pacman v r | # import the files into the repository under the name "pacman" |
| $ chmod -R g+w cvsroot/pacman | # give group permission to write. Only neccessary because IT-C's filesystem is xfs. |
| $ cd ~user1 | # back out |
| $ rm -rf pacman | # remove the temporary folder |
| $ cat cvsroot/pacman/readme.txt,v | # verify that the new file was created in the repository |
|
$ pwd
/import/home/user1 | # verify the absolute path to the repository |
| $ echo -e "\nexport CVS_RSH=ssh\n" >> ~/.bash_profile | # tell CVS to use SSH. |
| $ exit | # logout, then login again |
|
$ echo $CVS_RSH
ssh | # test that the setting has been made permanent |
|
$ cvs -d :ext:user1@ssh.it-c.dk:/import/home/user1/cvsroot co pacman
cvs server: Updating pacman U pacman/readme.txt | # checkout the module. You specify the CVS root, which is the login method, username, host and repository location. And then you specify an action |
| General tab, Authentication: SSH server |
| General tab, CVSROOT: :ext:ssh.it-c.dk:/import/home/user1/cvsroot |
| Ports tab, Check for an alternate rsh name: H:\putty\plink.exe |
| Globals tab, Checkout readonly: unchecked |
| Close the dialog by clicking OK, and exit the program to save the new preferences. |
| In the Left Pane on the Modules tab, select the directory to hold the pacman directory, e.g. H:\. |
| Invoke the Admin | Command Line dialog. |
| Enter cvs -d :ext:ssh.it-c.dk:/import/home/user1/cvsroot co pacman and click OK. |
| Click on pacman\readme.txt in the right pane to verify that it was indeed checked out. |
The "-P" option ensures that you will also get newly created directories
Files still marked with "C" needs manual resolving. Search for text between "<<<<", "----" and ">>>>". The first segment is the local version, the second segment is the server version. Remove the segment you don't want plus the markup inserted by CVS.
Alternatively, use Query | Query Update:
Files still marked with a "C"-icon needs manual resolving. Search for text between "<<<<", "----" and ">>>>". The first segment is the local version, the second segment is the server version. Remove the segment you don't want plus the markup inserted by CVS.
Document version: $Header: /home/cvs/projects/voop-itu/web/cvs-setup.html,v 1.8 2002/02/24 13:42:18 lth Exp $