How to connect to server on strange port, or when you're behind a firewall: Difference between revisions

From www.ReeltoReel.nl Wiki
Jump to navigation Jump to search
Line 26: Line 26:
=Rsync=
=Rsync=
from server to localdisk:
from server to localdisk:
  rsync -avz -e 'ssh -p PORTNUMBER' pvdm@localhost:/data/htdocs/motion/ /data/motion/
  rsync -avz -e 'ssh -p PORTNUMBER' USER@localhost:/data/htdocs/motion/ /data/motion/


=Start Konversation from behind a firewall=
=Start Konversation from behind a firewall=

Revision as of 08:08, 10 February 2012

Situation

cpuxxxx -> FW -> intermediateserver -> targetserver

22......-> 22 -> 22.................-> portnumber_on_targetserver

Connect

On cpuxxxx:

ssh -L portnumber_on_targetserver:targetserver:portnumber_on_targetserver username_on_intermediateserver@intermediateserver

Leave terminal open!

Then on cpuxxxx again:

ssh -YC username_on_targetserver@localhost -p portnumber_on_targetserver

That's it!!

Copy files

from here tot server:

scp -P portnumber_on_targetserver file user@localhost:/path/were/to/put/it/

from server to local:

scp -P portnumber_on_targetserver user@localhost:/path/were/to/get/it/from/ .

Rsync

from server to localdisk:

rsync -avz -e 'ssh -p PORTNUMBER' USER@localhost:/data/htdocs/motion/ /data/motion/

Start Konversation from behind a firewall

ssh -L 6667:irc.freenode.org:6667 user@xs3.xs4all.nl
konversation --server localhost

Start Pidgin from home to wzs

  • in a terminal typ:
ssh -L 8300:gwmsg.wonen.amsterdam.nl:8300 root@wzs
  • leave terminal open
  • start pidgin and fill in:
server: localhost
port: 8300