Thursday, June 25, 2009

How to configure terminal Services in Linux

How to configure terminal Services in Linux?


Configuring an OpenSSH:- By default ssh service is install in linux server you have to run the command
)#service sshd restart
)#ssh ipaddress of client system
Also, enable ssh service on client system and check the firewall setting.


After running the command, some information appears for the connection type yes and press enter. It asks you for the client system’s root password give the password you will connect to the system.


Configuring remote desktop:-Go to application->accessories->remote desktop
A vncviewer page appear check the box according to your setting .do the same setting on other system.


Then run the command )#vncviewer hostname:0
Go to other system click the allow option then after you will able to access the other system remotely.
Configuring telnet:- Install the telnet package on both the system (telnet-server, telnet-version name, xinet)
Run the command )#service xinetd restart
)#chkconfig telnet on


Run the command :

)#telnet IP address of other system
It asks for login name and password, give the username of their system user and their password you will connect to the system.

Encrypting and Decrypting a file in Linux

Encrypting a file in Linux :

To encrypt single file,
use command gpg as follows:$ gpg -c filename
To encrypt myfinancial.info file,
type the command:$ gpg -c myfinancial.info

Output:
Enter passphrase:
Repeat passphrase :

This will create a myfinancial.info.gpg file.
Option:
-c : Encrypt with symmetric cipher.

Caution if you ever forgot your password aka passphrase, you cannot recover the data as it use very strong encryption.

Decrypting a file in Linux:

To decrypt file use gpg command:
$ gpg myfinancial.info.gpg

Output:
gpg myfinancial.info.gpg
gpg: CAST5 encrypted data
Enter passphrase:

Decrypt file and write output to file vivek.info.txt you can run command:
$ gpg myfinancial.info.gpg –o vivek.info.txt

Remember if file extension is .asc, it is a ASCII encrypted file and if file extension is .gpg, it is a binary encrypted file.