ssh:

$ ssh root@192.168.1.1 -L 3000:10.0.0.1:22
$ ssh -R 3000:localhost:389 root@192.168.1.1
$ ssh -f -N -g #-f: background
#-N: no command to execute ...
#-g: disalbe restriction, permitting any host to connect to localally forwareded ports ..

$ ssh root@localhost -p 3000

login without passwort from <originhost> to <destinationhost>

from <originhost>:
#generate keys
$ ssh-keygen -t dsa -f ~/.ssh/id_dsa -C "comment"
#id_dsa.pub is created ...

#To use the key on other hosts you will be connecting from, copy the ~/.ssh/id_dsa key to the other hosts:
$ scp ~/.ssh/id_dsa you@another-box:.ssh/



$ cat ~/.ssh/id_dsa.pub |ssh root@192.168.1.1 'cat - >> ~/.ssh/authorized_keys2'
or
$ cat ~/.ssh/id_dsa.pub |ssh root@192.168.1.1 'cat - >> ~/.ssh/authorized_keys'

computer2know :: thank you for your visit :: have a nice day :: © 2018