passwordless ssh for an additional username?
I intend to do a passwordless ssh link for a subversion task. Now I'm making use of ssh+ svn, and also it's a little aggravating, due to the fact that I need to type the password at any time I intend to negotiate with the web server.
I've located numerous tutorials on the internet concerning just how to create a key for passwordless ssh, yet they all appear to think that I'm making use of the very same username on the remote system as I am for my residence system. Nonetheless, the username that I make use of for ssh+ svn is various that the customer account name on the system that I'm running. Just how do I set this up effectively? I have not had good luck with simply transforming the name in the key documents.
You do not need to have the very same username on both mashines. As long as you create the key (
ssh-keygen) you need to replicate line from
~/.ssh/id_dsa.pub (relying on sort of key) from neighborhood server and also add it to
~/.ssh/authorized_keys on remote.
% ssh-keygen % cat ~/.ssh/id_*.pub | ssh [email protected] 'cat > .ssh/authorized_keys'
If you do not intend to type
remoteuser each time append to
Host remoteserver User remoteuser
You simply need to provide the various other system's username in the
svn command :
$ svn co svn+ssh://[email protected]/path/to/repo
To address your inquiry's title, also :
$ ssh [email protected]
sshd on the remote equipment to search in
~otheruser/.ssh/authorized_keys for the general public key representing the exclusive key on the equipment you're keying the command on.
There are 2 means to do this :
1 ) placed customer @ right into the svn link; this informs svn+ ssh to login as that customer. I assume it's sort of a negative suggestion from an upkeep viewpoint due to the fact that points like externals that aim at various other components of the repository will not function appropriately.
2 ) make a ~/. ssh/config (recorded as ssh_config ) that claims something like :
Host othersystem User otheruser
in this manner any kind of effort to ssh to othersystem will certainly fail to making use of otheruser. Which comes in handy for you when do ssh by hand along with when you're making use of svn.