About Me

My photo
Working as Technical Lead in CollabNET software private limited.
Showing posts with label ssh. Show all posts
Showing posts with label ssh. Show all posts

Wednesday, 21 May 2008

SSH key generation

We will be ended up by re entering the password when ever we connect to a remote machine using ssh.

Here is the way to avoid re entering the password each and every time by generating a key pair Id and moving to remote machine only once.

ssh-keygen -t dsa

Generating public/private dsa key pair.
Enter file in which to save the key (/home/localuser/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/localuser/.ssh/id_dsa.
Your public key has been saved in /home/localuser/.ssh/id_dsa.pub.
The key fingerprint is:
93:58:20:56:72:d7:bd:14:86:9f:42:aa:82:3d:f8:e5 localuser@mybox.home.com

scp ~/.ssh/id_dsa.pub username@remotemachine:.ssh/authorized_keys


login to remote machine

chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys

Friday, 4 April 2008

Facing problem with X11

I've faced some problem with X11 forwarding. Then I analsyed the X process using ps -ef | grep X

I found the X process initialized has the argument--nolistentcp. Actually this prevents the tcp connection for X11. So make sure this is disabled in gdm.conf.

I came to know there is a entry in /etc/X11/gdm/gdm.conf which prevents the TCP connection.

after altering the "DisallowTCP"=false.

and restart the X windows.

To restart X windows CRTL + ALT + backspace or restart the system.

Friday, 22 February 2008

Basic X11 Forwarding Over SSH

X11Forwarding needs to be enabled on the sshd server. Do this by making the following edit:
File: /etc/ssh/sshd_config

After you make these changes, you will need to restart sshd so the changes will be accepted:
/etc/init.d/sshd restart

Don't forget to log out and log in to the server for this change to take effect.

Note: one reason for receiving the error messages

xterm Xt error: Can't open display: your_client_name:0.0

may be that X11Forwarding is not enabled on the server.
[edit] Running single apps

$ ssh -X < remote_server >

Monday, 23 July 2007

Powerfully using SSH

This is the article which gives good ideas to use SSH powerfully

http://polishlinux.org/apps/ssh-tricks/#