User Tools

Site Tools


ssh

This is an old revision of the document!


SSH

Converting SSH2 Keys

From ssh2 to openssh

ssh-keygen -i -f id_dsa.pub > id_dsa_open.pub

From OpenSSH to ssh2

ssh-keygen -e -f id_dsa.pub > id_dsa_ssh2.pub

SCP Speed UP

To increase speed on transfer you can force cipher to arcfour.
You can use same mechanism with rsync when you use ssh encapsulation.

scp -c arcfour <source> <destination>
rsync -av -e "ssh -c arcfour -l <username>" <Source> <Destination>

<span style="color:red">NOTE:</span> THis reduce your security though

SSH Tunnels

Forward Tunnel

It is used when you want to forward local port to remote port over SSH.

ssh -f -N -L 5445:localhost:5432 root@<machine>

Reverse Tunnel

It is used when you want to forward Remote Port to Local Port.
Usually used to allow access other way around.

ssh -f -N -R 5445:localhost:5432 root@<machine>
ssh.1319814994.txt.gz · Last modified: 2020/08/10 02:29 (external edit)