Wednesday, July 11, 2012
To VNC through SSH
Assuming you have already set up openssh on the server (previous post) the instructions are as follows:
On the server:
install a VNC server such as x11vnc
sudo apt- get install x11vnc
your firewall settings should be as follows:
port 22 (ssh) should allow incoming connections from anywere
port 5900 (vnc) should be open to ip address 127.0.0.1 (local host)
On the Client:
install a VNC client such as gtkvncviewer
sudo apt-get install gtkvncviewer
Still on the client:
You can now use local port-forwarding to connect port 5,900 on your server to port 5,900 your client.
ssh -L 5900:localhost:5900 <user>@<host>
note if using a port other than 22 for ssh add the -p XXXX option where XXXX is the port dedicated to ssh
Now that you are connected to the server issue the following cammand to enable the VNC session:
x11vnc -safer -localhost -nopw -once -display :0
Still on the client:
You can now open gtkvncviewer from the menu or issue the command from a fresh terminal window (or new tab)
set the server to 127.0.0.1
enter your username and password (for the server) to complete the connection
the server's desktop should appear after pressing "connect"
On the server:
install a VNC server such as x11vnc
sudo apt- get install x11vnc
your firewall settings should be as follows:
port 22 (ssh) should allow incoming connections from anywere
port 5900 (vnc) should be open to ip address 127.0.0.1 (local host)
On the Client:
install a VNC client such as gtkvncviewer
sudo apt-get install gtkvncviewer
Still on the client:
You can now use local port-forwarding to connect port 5,900 on your server to port 5,900 your client.
ssh -L 5900:localhost:5900 <user>@<host>
note if using a port other than 22 for ssh add the -p XXXX option where XXXX is the port dedicated to ssh
Now that you are connected to the server issue the following cammand to enable the VNC session:
x11vnc -safer -localhost -nopw -once -display :0
Still on the client:
You can now open gtkvncviewer from the menu or issue the command from a fresh terminal window (or new tab)
set the server to 127.0.0.1
enter your username and password (for the server) to complete the connection
the server's desktop should appear after pressing "connect"
Friday, July 6, 2012
Linux in the clouds
There
are quite a few distros available for netbook users including at the
time of this writing ubuntu remix, lubuntu, peppermint os, linux mint (XFCE or LXDE), jolicloud and chrome OS to name a few.
Currently I own an Asus 1005-HAB and two of the distros that I
personally enjoy are jolicloud and peppermint. Jolicoud is unique in
the sense that the interface has resemblance to a smartphone. This
feature makes it very user friendly and an easy concept to grasp for
those making the switch to linux for the first time. Jolicloud has quite an extensive hardware
compatability list and a separate list for 3G support. Being somewhat of
a linux noob the fact that it works right out of the box is a definite plus. They also provide an app store with a wide variety of apps
including boxee and hulu desktop. In fact if the app you want isn't listed Jolicloud gives you the option of making your own. Peppermint OS appears to be a stripped down versions of linux mint
without any additional bloatware incorporated. It uses LXDE wich is very light on
resources.
It is extremely fast to boot-up and is my goto if I just want to do
something on the internet. I even replaced puppy linux on all of my
jumpdrives with peppermint. Puppylinux is another lightweight operating
system that can load completely in RAM. However I never quite mastered
navigation in puppy using a touch pad on a net book since puppy uses a single click to open windows; thus merely navigating across the screen would pop up unintended
applications.
Setting up SSH in linux
From the command line install open ssh
client and server with the following commands:
sudo apt-get install openssh-client
sudo apt-get install openssh-server
make a copy of the original configuration file and protect it from
being over written with the following commands:
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.original
sudo chmod a-w /etc/ssh/sshd_config.original
sudo chmod a-w /etc/ssh/sshd_config.original
Rather than use a password for logging in we are going to use keys.
note: The default file location is fine. Also be sure to set a good
pass phrase. To make sure your key is even more secure we are going to encrypt it at 4096 bits rather than the default 2048:
ssh-keygen -t rsa -b 4096
ssh-keygen -t rsa -b 4096
To transfer the public key from the
server (or host computer) to your computer (client) ssh in to the
server using the password then issue the following command:
ssh-copy-id <username>@<host>
note: this has to be done using port 22
Next we are going to edit the
/etc/ssh/sshd_config
gksu gedit /etc/ssh/sshd_config
note this can also be done with,
leafpad, nano. vim, vi....
Since we are using keys instead
of passwords we want the following:
PasswordAuthentication
no
More
security can also be achieved by allowing particular users:
AllowUsers
Alice Bob Eve
Now
is a good time to set the following:
PermitRootLogin
no
AuthorizedKeysFile %h/.ssh/authorized_keys
note:
It is also a good idea to change the port from 22 to something else
but only after issuing the ssh-copy-id command.
Make
sure the following lines are uncommented by deleting the
preceding “#” sign.
Personally I also change the following settings:
LogLevel
VERBOSE
Banner
/etc/issue.net
note:
The Banner option lits the contents of /etc/issue.net file when
logging in
After
saving the file and restart the sshd server by issuing the following
command:
sudo /etc/init.d/ssh restart
Subscribe to:
Posts (Atom)