Skip to main content

Accessing your Linux workstation in a corporate network from home PC

Running the following commands assumes that you have already started OpenSSH server at workstation and opened port 22 at your home router. Opening 22 or any other port at workstation is not needed, the only precondition is that you should be able to ping your home PC from the workstation.

How to setup SSH tunnel to your workstation from outside corporate network (for example, from home to work)?

You should run this command on your workstation:
ssh -f -N -q -R 2222:localhost:22 yourhomeusername@yourhomeip
Now you can connect from home to your workstation via SSH using this command:
ssh -p 2222 yourworkusername@localhost
You can even create a fully-functional session on your Linux desktop using No Machine tools (http://www.nomachine.com/). Just install node and server components on your workstation and connect via client from your home PC. A new session will be created.
Also you can directly run some programs which require X server (but the interaction speed will be pretty slow) by adding -X key:
ssh -X -p 2222 yourworkusername@localhost
$ xclock

How to setup VNC tunnel to your workstation from outside corporate network?

You should run this command on your workstation:
ssh -f -N -q -R 2222:localhost:5900 yourhomeusername@yourhomeip
Now you can connect from home to your workstation via VNC using host "localhost" and port 2222

Popular posts from this blog

Switching between keyboard layouts in Openbox (Arch Linux)

Switching between two (or more) keyboard layouts in Openbox DE is a task that's quite easy to accomplish, although it might not be so obvious as in other desktop environments. This solution was tested on Arch Linux. You just need to edit this file (assuming you want to switch between English and Ukrainian Phonetic layouts with Alt-Shift): /etc/X11/xorg.conf.d/01-keyboard-layout.conf Section "InputClass" Identifier "keyboard-layout" Driver "evdev" MatchIsKeyboard "yes" Option "XkbLayout" "us,ua(phonetic)" Option "XkbModel" "pc105" Option "XkbOptions" "grp:alt_shift_toggle" EndSection If you have Nvidia card, don't forget to edit /etc/X11/xorg.conf.d/20-nvidia.conf and change Driver from "kbd" to "evdev" in InputDevice section: Section "InputDevice" Identifier "Keyboard0" Driver "evdev" EndSection Y...

How to control CPU frequency on Linux Fedora 20

Sometimes you need to make CPU run faster or slower, depending on your needs. In Linux you can control this by using different CPU governors. The following steps were tested on Fedora 20, but most likely they would also work on later versions of Linux Fedora OS. sudo yum install kernel-tools Check the available CPU governors: sudo cpupower frequency-info --governors sudo cpupower frequency-set --governor [governor] More information about the governors here: http://docs.fedoraproject.org/en-US/Fedora/20/html/Power_Management_Guide/cpufreq_governors.html

How to run Jekyll server on Cloud9

So you already have your Cloud9 account and your Jekyll site is in your workspace. Now you want to run the server. It is actually very simple. In a fresh Could9 workspace you only need to execute the following two commands in the terminal window: gem install jekyll jekyll serve --host 0.0.0.0 --port 8080 After executing these two commands you can open your site in the browser using the following link: https://[workspacename]-c9-[username].c9.io Important note: Only port 8080 works for me in Cloud9, other ports are closed. Also assigning host to 0.0.0.0 is necessary.