Configure password-less SSH access
Before you configure Subversion or Dreamweaver for SVN+SSH, create an RSA key pair and configure the public key on the server. This public/private key pair is used to authenticate with the server, instead of storing and passing your password in plain text. (It is possible to configure SSH without using key pairs; however, Adobe doesn't recommend doing so because of the lack of security.)
To configure the RSA keys, create the private/public RSA key pair on the client computer. Put the public key on the server, and then authorize the key on the server. Adobe also recommends testing the SSH connection afterward to verify that it is configured correctly.
Note: Access to the client computer (that is, the one from which you connect) is required to complete these steps. These steps also require access to the server (for example, directly or via SSH/FTP). On Windows, you need access to an SSH client (for example, TortoiseSVN) and an RSA key generator application (for example PuTTYgen). Mac OS comes with an SSH client and a key generator.
Create RSA keys on Mac OS
Complete these steps on the client computer:
Input the following command and then press Enter:
ssh-keygen -t rsa
(Optional) Type a passphrase for the key, then press Return/Enter. If you typed a passphrase, then type it again to confirm and press Return/Enter.
A confirmation message appears showing that the private and public keys were saved, including their save location and names.
To copy the public key to the server, input a command like the following, substituting the appropriate AccountName and ServerName:
scp .ssh/id_rsa.pub AccountName@ServerName:~/temp_rsa.pub
Connect to the server via SSH. Input a command like the following, substituting the appropriate AccountName and ServerName:
ssh -l AccountName@ServerName
Type your password when prompted to log in.
Note: If you can log in without being prompted for your password, then your computer/login has already been authorized on the server. Skip the next section and go directly to Test the SSH connection, below.
Proceed to Configure the key on the server.
Create RSA keys on Windows
Complete these steps on the client computer:
Connect to the server via SSH. Assuming that you're using TortoiseSVN, input a command like the following, substituting the appropriate AccountName and ServerName:
tortoiseplink AccountName@ServerName
Type your password when prompted to log in.
Note: If you can log in without being prompted for your password, then your computer/login has already been authorized on the server. Skip the next section and go directly to Test the SSH connection, below.
Proceed to Configure the key on the server.
Configure the key on the server
On the server (for example, directly or via SSH/FTP), complete the following steps:
Verify that the .ssh folder exists on the server. Input the following command and then press Enter:
ls -al ~/.ssh
Do one of the following:
- If the results of the ls command indicate that the folder does not exist, then create it and then authorize the key on the server. Input the following commands, and press Enter after each one:
mkdir ~/.ssh
mv ~/temp_rsa.pub ~/.ssh/authorized_keys
- If the folder exists, then add the key to the server's authorization list. Input the following commands, and press Enter after each one:
cat ~/.ssh/authorized_keys ~/temp_rsa.pub > temp_keys
mv temp_keys ~/.ssh/authorized_keys
Test the SSH connection
Once you have completed the steps above, test to make sure you can connect to your server via SSH without being prompted for a password.
If you can connect but are still being prompted for a password, repeat the applicable server-side steps above. Consider starting over by creating a key pair on the client, and then repeating the remaining steps.
Note: When generating keys, be sure to specify the correct number of bits for your server. 2048 bits is fairly common. However, check with your web host if you are not certain.
If you still can't connect without being prompted for a password, see the OpenSSH or your web host for additional assistance.
Configure Subversion to use SSH
To configure Subversion to use SSH, add the path to your SSH client and your login information to the Subversion config file.
Note: This information assumes that Windows users are using TortoiseSVN, and that Mac users are using the Mac OS SSH client.
Locations of Subversion config file
To complete these steps, first open the Subversion configuration file for editing. The config file is in one of the following folders:
- Windows 7 and Vista
C:\Users\Your User Name\AppData\Roaming\Subversion\config - Windows XP
C:\Documents and Settings\Your User Name\Application Data\Subversion\config - Mac OS X
/Users/Your User Name/.subversion/config
Configure Subversion for Mac OS
For example, enter nano ~/.subversion/config into Terminal.
ssh = $SVN_SSH /usr/bin/ssh
Note: To use key-based authentication, add -i PathToKey. E.g. ssh = $SVN_SSH /usr/bin/ssh -i PathToKey
Alternatively, you can enter the user name and password into this path by adding -l UserName -pw Password. This method is insecure and, therefore, Adobe doesn't recommend it.
Configure Subversion for Windows
Open the file and enter the following within the tunnels section (underneath [tunnels]):
ssh = $SVN_SSH C:/PathToSSHClient/tortoiseplink.exe
Note: To use key-based authentication, add -i PathToKey. E.g. ssh = $SVN_SSH C:/PathToSSHClient/tortoiseplink.exe -i PathToKey
Alternatively, you can enter the user name and password into this path by adding -l UserName -pw Password. This mthod is insecure and, therefore, Adobe doesn't recommend it.
Set your site to use Subversion with SSH
Note: The user name and password are NOT taken from Dreamweaver. The only way to send user is to enter AccountName@ServerName in the server name field.
Click the Test button to test the connection.
Right-click (Windows) or Ctrl+click (Mac OS) on the root folder to display the menu.
More like this
Build beautiful websites in Dreamweaver
Design, code, and manage dynamic websites in a powerful all-in-one tool.