SSH connection establisment.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting SSH connection establisment.
# 1  
Old 10-03-2013
Question SSH connection establisment.

Hi All,

I am trying to create an ssh connection between 2 servers.
Below are the steps which i have followed.
Code:
 
 
On server A::
 
ssh-keygen -t rsa
scp ~/.ssh/id_dsa.pub user@B:

Server B ::
cat id_dsa.pub >> ./.ssh/authorized_keys

But when i tried to connect through ssh i was prompted for password.
Please find my ssh version

OpenSSH_4.3p2, OpenSSL 0.9.8n 24 Mar 2010

Please correct me if there are any mistakes in my method.
This User Gave Thanks to Girish19 For This Post:
# 2  
Old 10-03-2013
You need to chmod 700 your ~/.ssh/ folders, and make sure your home-folders aren't world-readable, writable, executable. ssh will stop them from connecting if anything is wrong with these permissions.
# 3  
Old 10-03-2013
I have changed the permissions of .ssh directory to 700 on both server A and server B. And even changed the permissions of authorized_keys to 700 on server B. But still not able to connect.
# 4  
Old 10-03-2013
What are the permissions on your home directories?
This User Gave Thanks to Corona688 For This Post:
# 5  
Old 10-03-2013
Please find the list of files and directories in my home directory
Code:
$ cd $HOME
$ ls -lart
total 66
-rwxr-x---   1 u277084  fnusr        627 Jul 10 08:35 .profile
-rwxr-x---   1 u277084  fnusr        636 Jul 10 08:35 .login
-rwxr-x---   1 u277084  fnusr        362 Jul 10 08:35 .kshrc
-rwxr-x---   1 u277084  fnusr        591 Jul 10 08:35 .cshrc
-rwxrwxrwx   1 u277084  fnusr         88 Jul 18 03:08 a
-rw-r--r--   1 u277084  fnusr         10 Aug 26 08:59 s
--wxrwxrwx   1 u277084  fnusr         44 Aug 26 09:03 test
drwxr-xr-x  93 root     root          94 Aug 26 14:19 ..
-rw-r--r--   1 u277084  fnusr          2 Sep 12 08:36 1
-rwxrwxrwx   1 u277084  fnusr        138 Sep 13 02:10 samp.sh
drwxr-x---   3 u277084  fnusr         13 Oct  3 09:02 .
drwx------   2 u277084  fnusr          5 Oct  3 10:50 .ssh
-rw-------   1 u277084  fnusr      14538 Oct  3 11:06 .sh_history


Last edited by Franklin52; 10-04-2013 at 03:10 AM.. Reason: Please use code tags
This User Gave Thanks to Girish19 For This Post:
# 6  
Old 10-03-2013
SSH is picky about the permissions of your home directory itself, not just the things inside it. What are the permissions on your home directories?

Code:
ls -ld ~/

This User Gave Thanks to Corona688 For This Post:
# 7  
Old 10-04-2013
Please find the permissions
Code:
$ ls -ld ~/
drwx------   3 u277084  fnusr         14 Oct  4 03:58 /home/u277084/


Last edited by Franklin52; 10-04-2013 at 07:45 AM.. Reason: Please use code tags
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Ssh script to validate ssh connection to multiple serves with status

Hi, I want to validate ssh connection one after one for multiple servers..... password less keys already setup but now i want to validate if ssh is working fine or not... I have .sh script like below and i have servers.txt contains all the list of servers #/bin/bash for host in $(cat... (3 Replies)
Discussion started by: sreeram4
3 Replies

2. BSD

Connection SSH to remote by ssh

Hello guys! I am setting up a script to access a unix remote server. My problem is that when I put the ssh line "my host", the script does not wait for the server response asking for the password to execute the line in which I put the password, that is, I need to put a form in which script has a... (1 Reply)
Discussion started by: aroucasp
1 Replies

3. UNIX for Advanced & Expert Users

Connection-less using ssh

Hi! I know its a recurring problem, but I am failing to sort this out, I have two servers ( A and B), in which I am able to connect without having to put password from server B to server A, but the connect from server A to server B. takes 7 minutes to establish??? on Server A, I have the... (7 Replies)
Discussion started by: fretagi
7 Replies

4. UNIX for Advanced & Expert Users

How keep running a program n an another computer via a connection ssh when the connection is closed?

Hi everybody, I am running a program on a supercomputer via my personal computer through a ssh connection. My program take more than a day to run, so when I left work with my PC I stop the connection with the supercomputer and the program stop. I am wondering if someone know how I can manage... (2 Replies)
Discussion started by: TomTomGre
2 Replies

5. Red Hat

Ssh connection

hi, I have ssh connection between two servers for a functional Id for SFTP purpose. I aim is to setup this for is only work when below command is used by a .ksh script. ssh userid@servername:/directory Unfortunately users who have access to functional id are manually using above command... (2 Replies)
Discussion started by: maddy26615
2 Replies

6. AIX

ssh connection closed by ip

Hi i am trying to do ssh without password between 2 aix servers. before i generate the keys, i am able to do the ssh & it is asking for password & i am able to login. ======================== # ssh 172.29.150.77 root@172.29.150.77's password: ======================== but when i generate rsa... (1 Reply)
Discussion started by: makarand.bhatka
1 Replies

7. Shell Programming and Scripting

SSH Connection To Oracle

My problem is this....:eek: Platform=Sun Solaris UNIX / Oracle 10g 1) I'm trying to SSH from my local system A to remote system B 2) Once connected, I need to sudo to ID that has the ability to connect to the Oracle database 3) Then run a script that connects via sqlplus and... (2 Replies)
Discussion started by: khand67
2 Replies

8. UNIX for Dummies Questions & Answers

ssh connection

Hi @ all! I've a problem with a ssh-connection. I want to establish a ssh-connection between an AIX-System and an SunOS-System without a password. The Users are different one's. Command : user1@server1 /home/user1 > ssh user2@server2 Is it possible? Greetings olli-h (1 Reply)
Discussion started by: olli-h
1 Replies

9. UNIX for Advanced & Expert Users

ssh connection

pls how do i connect to my freebsd server via ssh from a windows client?? I have sshd running on d freebsd server. (9 Replies)
Discussion started by: lealyz
9 Replies
Login or Register to Ask a Question