Connection-less using ssh


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Connection-less using ssh
# 1  
Old 03-24-2015
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 following settings:
Code:
 ls -ld
drwxr-xr-x   8 nikira   sys       128512 Mar 24 03:45 .
[nikira@nikira-app1 nikira_data01]$ cd .ssh/
[nikira@nikira-app1 .ssh]$ ls -lrt
total 16
-rw-------   1 nikira   sys          672 Aug  2  2012 id_dsa
-rw-r--r--   1 nikira   sys          608 Aug  2  2012 id_dsa.pub
-rw-------   1 nikira   sys          883 Aug  2  2012 id_rsa
-rw-r--r--   1 nikira   sys          228 Aug  2  2012 id_rsa.pub
-rw-------   1 nikira   sys          834 Aug  2  2012 authorized_keys
-rw-r--r--   1 nikira   sys         2385 May 28  2013 known_hosts
[nikira@nikira-app1 .ssh]$ pwd
/nikira_data01/.ssh
[nikira@nikira-app1 .ssh]$

And on server B:
Code:
 cd /nikira_data01
[nikira@nikira-app2 nikira_data01]$ ls -ld
drwxr-xr-x   6 nikira   sys          512 Aug 28  2012 .
[nikira@nikira-app2 nikira_data01]$ cd .ssh/
[nikira@nikira-app2 .ssh]$ ls -lrt
total 16
-rw-------   1 nikira   sys          668 Aug  2  2012 id_dsa
-rw-r--r--   1 nikira   sys          606 Aug  2  2012 id_dsa.pub
-rw-------   1 nikira   sys          887 Aug  2  2012 id_rsa
-rw-r--r--   1 nikira   sys          228 Aug  2  2012 id_rsa.pub
-rw-------   1 nikira   sys          606 Aug  2  2012 authorized_keys_bkp
-rw-------   1 nikira   sys          834 Aug  2  2012 authorized_keys
-rw-r--r--   1 nikira   sys         1769 Oct  2  2013 known_hosts
[nikira@nikira-app2 .ssh]$ pwd
/nikira_data01/.ssh
[nikira@nikira-app2 .ssh]$

So I have exactly the same settings, but its taking almost 10 minutes to connect from A to B, but almost instantly from B to A
Please can you help?
# 2  
Old 03-24-2015
Problems like this instantly make me think of DNS problems, although 7+ minutes is very long. Did you check/compare your DNS configuration?
# 3  
Old 03-24-2015
I have looked at
Code:
/etc/nsswitch.conf

, so in server A, this file is lile this:

Code:
passwd:     files
group:      files
#hosts:      dns files
hosts:      files

and on server B the same file looks like this:

Code:
passwd:     files
group:      files
#hosts:      files dns
hosts:      files
ipnodes:    files


But what is strange, is from server A to a third server (server C) it does not ask for a password and its fast in both directions.

The issue is only between one direction between server A and server B
# 4  
Old 03-24-2015
Do the servers have their own names listed in /etc/hosts ?
# 5  
Old 03-24-2015
yes, I have FQDN in
Code:
/etc/hosts

, but for some unknow reason, because I did not do anything, its now OK???? I have only try to ssh using IP address rather hostname, so it was quick
# 6  
Old 03-24-2015
Because you don't use a name service like DNS, any hostname must be in /etc/hosts.
What OS?
Code:
uname -sr

In case of Solaris check /etc/inet/ipnodes in addition to /etc/inet/hosts and its link /etc/hosts.
# 7  
Old 03-25-2015
Hi

Code:
 uname -sr
SunOS 5.10

the contents of the 3 files you mention are the same in all 3 servers, but as said previously, for some reason it looks fine now, as it takes only 3 secs to login:

Code:
 time ssh nikira-app2
Last login: Wed Mar 25 08:40:52 2015 from 10.100.4.72
Oracle Corporation      SunOS 5.10      Generic Patch   January 2005
[nikira@nikira-app2 ~]$ exit
logout
Connection to nikira-app2 closed.

real    0m3.711s
user    0m0.318s
sys     0m0.047s
[nikira@nikira-app1 ~]$

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

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

4. 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

5. 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

6. 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

7. Solaris

ssh connection failed.

When i was connecting the Solaris system by sftp . i got the following error. "Warning: child process (/usr/local/bin/ssh2) exited with code 74." Could any one help, how to fix it ? (1 Reply)
Discussion started by: nag.mi2000
1 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