Remote Access

Remote Access lets you to connect other computer that are located over the network.
Makes your life easier to manage nodes remotely you don’t need to be there physically you can connect your node through remote access, for command-line remote access Linux provide us SSH (Secure SHell) if you are looking graphical remote environment then VNC (Virtual Network Computing ) is there to serve.


what is ssh ?
Its Secure SHell that provides encrypted tunnel from your computer to remote computer. SSH is secured with encryption so you don’t need to be worried when you are on SSH.

More secure ssh connectivity.

ssh is inherently secured but at the same time if your server is online its always better you give access to fewer users who can connect over the wire using ssh. as we know ‘root’ is super user its recommended only use ‘root’ when you need to perform administrative tasks.
so you can restrict SSH to non-privileged users.

In main config file of ssh that is located on ‘/etc/ssh/sshd_config’ you can see the default options using cat.

cat /etc/ssh/sshd_config

By default user ‘root’ is allowed to connect.

PermitRootLogin yes

In order to make ssh more secure we can change ‘PermitRootLogin no ‘ this will give us a chance to monitor ‘root’ usage when someone try to use ‘su root’ because ‘su’ logs an entry in log.

[root@loadb1 ~]# vi /etc/ssh/sshd_config
PermitRootLogin no

you need to restart the ssh service in order to changes takes effect.

service sshd restart

How to connect using ssh ?

You can establish a ssh connection using this command ‘ssh username@hostname or IP’

[root@lbroexperts ~]# ssh ali@broexperts
Last login: Tue Jun 19 07:25:39 2012 from
[ali@broexperts ~]$

How to connect Linux from windows via ssh ?

For the sake of this purpose you can download ( Putty ) software that is freely available on internet.
Download Putty

What is VNC ?

VNC ( Virtual Network Computer ) also for remote access, ssh is available for command line remote access and in order to get graphical environment of remote pc such as you are sitting in front of that pc, you can use vnc. VNC uses ( 5900-590x ) port numbers. Tigervnc is available in CentOs 6.2 for graphical remote sessions.

How to Install tigervnc-server on CentOs 6.3 ? < see this tutorial

yum install tigervnc-server

Edit config file’s last two lines.

[root@lx1 Desktop]# vi /etc/sysconfig/vncservers

# Use "-localhost" to prevent remote VNC Clients.
VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp"

Add vnc on start up.

[root@lx1 Desktop]# service vncserver start

How to connect with vnc ?

how to connect your linux box from a linux client.

vncviewer ip or hostname:2

Note : If you are using winodws you can connect your Linux box using RealVnc.

Similar Posts