Other links
Random (Thoughts?)
Although I am working with VDX.TV, I do a lot of pet projects in my spare time. It can include anything. In these works, I gain a lot of experience. Links to such recent experiences are given below.
Intro
Tricks in SSH
-
Setup autologin to a remote host
$ if [ ! -f ~/.ssh/id_rsa.pub ]; then ssh-keygen -t rsa; fi; cat ~/.ssh/id_rsa.pub | ssh <ssh options> <user>@<host> 'if [[ ! -d .ssh ]]; then mkdir .ssh; fi;cat >> .ssh/authorized_keys'
- Login to
U1@H1:P1
viaU2@H2:P2
- Old style, works only on linux with bsd style netcat
$ ssh -o ProxyCommand="ssh -p P2 U2@H2 nc -q0 %h %p" -p P1 U1@H1
- New style, may require an updated version of SSH
$ ssh -J U2@H2:P2 -p P1 U1@H1
$ ssh -o ProxyJump U2@H2:P2 -p P1 U1@H1
**Can add more jump by sperating using comman
- Old style, works only on linux with bsd style netcat
- Login to
U1@H1:P1
throughU2@H2:P2
transparently-
Need to add info to the
~/.ssh/config
Host aRandomName2 User U1 Port P1 Hostname H1 Host aRandomName1 User U1 Port P1 Hostname H1 ProxyJump aRandomName2
ssh
toU1@H1:P1
$ ssh aRandomName1
- To open
U1@H1:P1
from file browser, typesftp://aRandomName1
and enter
-