Category: ssh
Custom identity file (id_rsa.pub) with git client
Whenever you want to use a custom identity file with ssh, you usually use the -i parameter.
This will validate against ~/.ssh/other_id_rsa.pub and not the default one at ~/.ssh/id_rsa.pub.
If you want to use this with the default git client, it won't work. You cannot specify the identity file when cloning/pulling from or pushing to a repository, yet.
So:
2
$ git pull origin master
will fail, because it's using the default rsa key at ~/.ssh/id_rsa.
Instead you can use this workaround.
Adjust your ~/.ssh/config and add:
2
3
4
Hostname example.com
User myuser
IdentityFile ~/.ssh/other_id_rsa
Now use the ssh host alias as your repository:
2
$ pull origin master
And it should use the other_id_rsa-key!
Forwarding X on Linux/Unix Machines
Like ssh.com says, you need to do the following things to successfully forward an X-Server to your client.
- Servers X-Config needs to have: 1AllowX11Forwarding yes
- <font face="Arial,Helvetica,sans-serif">Clients Set in /etc/ssh2/sshd2_config:</font> 1ForwardX11 yes
- Now connect via following command:1ssh -X login@server.topleveldomain.example.org
- After that, use declare command to set the display to your servers one:1declare -X DISPLAY="99.99.99.99:0.0"
(with your IP)
Thats it.


