Schlagwort-Archive: linux

howto: ssh-forwarding

Local vs Remote SSH port forwarding

When it comes to the art of SSH tunnelling, there are basically two options where to relay a port to.

You can relay a port from a remote server to your local machine with ssh -L, hence called local port forwarding. A very basic use-case is if your remote server has a MySQL database daemon listening on port 3306 and you want to access this daemon from your local computer.

The second option is to make your local port available on a remote server (ssh -R). Remote port forwarding might come in handy if you for example want to make your local web-server available on a port of a public server, so that someone can quickly check what your local web-server provides without having to deploy it somewhere publicly.

It should now be pretty easy to remember: Local and remote port forwarding always refers to where to relay the port to. The SSH command syntax uses the same easy to remember abbreviations: -L (forward to my local machine) and -R (forward to my remote machine).

 

Mehr bei http://www.everythingcli.org/ssh-tunnelling-for-fun-and-profit-local-vs-remote/

Weiterlesen

EMail Adressen aus einer Textdatei filtern

Möchte man z.b. aus einem Log-File nur die Email-Adressen extrahieren, kann man das mit grep machen:

$ grep -i -o ‚[A-Z0-9._%+-]+@[A-Z0-9.-]+.[A-Z]{2,4}‘ file.csv

Quelle:
http://stackoverflow.com/questions/19940935/extract-email-addresses-from-text-file-using-regex-with-bash-or-command-line

FFmpeg: Bild mit Musik versehen

Create a video with a still image (input.png) and an audio file (audio.ogg):

ffmpeg -loop 1 -r 2 -i input.png -i audio.ogg -c:v libx264 -preset medium -tune stillimage -crf 18 -c:a copy -shortest -pix_fmt yuv420p output.mkv

Achtung – Hochkant Bild erzeugt auch Hochkant Video!