Sponsored Content
Operating Systems AIX Passwordless SSH problem with AIX machines Post 302749371 by filosophizer on Friday 28th of December 2012 06:45:52 AM
Old 12-28-2012
Repeated the procedure once again.

Machine A and repeated the same on machine B
Code:
$hostname
standby
$whoami
oraprod
$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oraprod/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oraprod/.ssh/id_rsa.
Your public key has been saved in /home/oraprod/.ssh/id_rsa.pub.
The key fingerprint is:
48:9a:0a:d5:6d:55:ab:8e:87:48:9a:09:64:23:65:54 oraprod@standby
The key's randomart image is:
+--[ RSA 2048]----+
| .+.E   ...      |
| o . . .   .     |
|.+. . +   .      |
|+..  = . .       |
|o   + . S        |
| o * . +         |
|  = . o o        |
|       .         |
|                 |
+-----------------+
$ cd .ssh

$ ls
id_rsa      id_rsa.pub

$ cat id_rsa.pub >> ~/.ssh/authorized_keys_4SecondaryServer

$ ls
authorized_keys_4SecondaryServer  id_rsa           id_rsa.pub

$ cat authorized_keys_4SecondaryServer
ssh-rsa <<deleted by the poster...line too big>>

FTP from the SecondaryServer the file authorized_keys

$ ls
authorized_keys_authorized_keys_4SecondaryServer  id_rsa
authorized_keys    id_rsa.pub

$ cp authorized_keys_4standby authorized_keys

$ chmod 600 authorized_keys

$ ls -ltra
total 48
drwxr-xr-x   3 oraprod  dba             256 Dec 28 14:19 ..
-rw-r--r--   1 oraprod  dba             397 Dec 28 14:20 id_rsa.pub
-rw-------   1 oraprod  dba            1675 Dec 28 14:20 id_rsa
-rw-------   1 oraprod  dba             395 Dec 28 14:29 authorized_keys
-rw-r--r--   1 oraprod  dba             398 Dec 28 14:32 known_hosts
drwx------   2 oraprod  dba             256 Dec 28 14:32 .

$ ls -ltra
total 80
-rwxr-----   1 oraprod  dba             254 Nov 30 21:15 .profile
drwxr-xr-x   6 bin      bin             256 Dec 02 18:30 ..
-rw-r--r--   1 oraprod  dba             205 Dec 10 19:24 smit.transaction
-rw-r--r--   1 oraprod  dba              81 Dec 10 19:24 smit.script
-rw-------   1 root     system          100 Dec 10 19:30 .bash_history
-rw-r--r--   1 oraprod  dba            3663 Dec 27 23:23 smit.log
-rw-r--r--   1 oraprod  dba             674 Dec 28 14:19 standby.txt
drwxr-xr-x   3 oraprod  dba             256 Dec 28 14:19 .
drwx------   2 oraprod  dba             256 Dec 28 14:32 .ssh
-rw-------   1 oraprod  dba           13942 Dec 28 14:38 .sh_history

$ ls -ltra
total 16
drwxr-xr-x   2 guest    usr             256 Dec 05 2004  guest
drwx------   2 root     system          256 Nov 29 20:15 lost+found
-rw-r--r--   1 root     system            1 Dec 02 18:30 .profile
drwxr-xr-x   6 bin      bin             256 Dec 02 18:30 .
drwxr-xr-x   2 applprod dba             256 Dec 07 17:26 applprod
drwxr-xr-x  26 root     system         4096 Dec 28 14:08 ..
drwxr-xr-x   3 oraprod  dba             256 Dec 28 14:19 oraprod


$ ssh test1 date
The authenticity of host 'test1 (10.1.1.120)' can't be established.
RSA key fingerprint is 71:3b:ba:cb:d1:bf:94:41:a8:6f:3a:00:10:d0:65:ca.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'test1,10.1.1.120' (RSA) to the list of known hosts.
Connection closed by 10.1.1.120

$ ssh test1 date
Connection closed by 10.1.1.120

Check the authlog on Machine B:

Code:
Dec 28 13:35:29 test1 sshd[348342]: Received signal 15; terminating.
Dec 28 13:38:52 test1 sshd[233588]: Server listening on 0.0.0.0 port 22.
Dec 28 13:38:52 test1 sshd[233588]: error: Bind to port 22 on :: failed: The socket name is already in use..
Dec 28 13:38:52 test1 sshd[233588]: error: Couldn't create pid file "/usr/local/etc/sshd.pid": A file or directory in the path name does not exist.
Dec 28 13:38:52 test1 tsm: 3004-035 TSM: write to /dev/vty2 failed.
Dec 28 14:09:23 test1 su: from root to oraprod at /dev/pts/0


Check the authlog on Machine A

Code:
Dec 28 13:35:12 standby sshd[303218]: Received signal 15; terminating.
Dec 28 13:38:55 standby sshd[254156]: Server listening on 0.0.0.0 port 22.
Dec 28 13:38:55 standby sshd[254156]: error: Bind to port 22 on :: failed: The socket name is already in use..
Dec 28 13:38:55 standby sshd[254156]: error: Couldn't create pid file "/usr/local/etc/sshd.pid": A file or directory in the path name does not exist.
Dec 28 13:38:56 standby tsm: 3004-035 TSM: write to /dev/vty2 failed.
Dec 28 13:44:36 standby syslog: pts/1: failed login attempt for UNKNOWN_USER from testserver
Dec 28 13:44:36 standby tsm: 3004-035 TSM: write to /dev/pts/1 failed.
Dec 28 14:08:36 standby su: from root to oraprod at /dev/pts/0


/etc/hosts.allow

Code:
Machine A

$ cat /etc/hosts.allow
ALL : ALL : allow
sshd : ALL : allow
$

Machine B
$ cat /etc/hosts.allow
ALL : ALL : allow
sshd : ALL : allow
$

/etc/hosts.deny
empty
Code:
Machine A
$ cat /etc/hosts.deny


Machine B
$ cat /etc/hosts.deny


Now making the changes as requested

Quote:
Originally Posted by -=XrAy=-
I am not familar with the "host.allow" file. We doesn't use them Smilie
It is possible to delete this file for testing?

P.S.
To reduce the error messages when sshd starts, You can change the following lines in the sshd config (uncomment them):
ListenAddress 0.0.0.0
PidFile /var/run/sshd.pid
deleted hosts.allow and hosts.deny

then
# stopsrc -s sshd ; startsrc -s sshd
# stopsrc -s syslogd ; startsrc -s syslogd


Now ssh from one Machine A to Machine B

Code:
Machine A
# su - oraprod
$ ssh test1 date
Connection closed by 10.1.1.120

Machine B
# su - oraprod
$ ssh standby date
Connection closed by 10.1.1.105

Machine A : Authlog
Dec 28 14:51:46 standby sshd[254156]: Received signal 15; terminating.
Dec 28 14:51:49 standby sshd[254158]: Server listening on 0.0.0.0 port 22.
Dec 28 14:51:49 standby sshd[254158]: error: Couldn't create pid file "/var/run/sshd.pid": A file or directory in the path name does not exist.
Dec 28 14:54:20 standby su: from root to oraprod at /dev/pts/0

Machine B: Authlog

Dec 28 13:35:29 test1 sshd[348342]: Received signal 15; terminating.
Dec 28 13:38:52 test1 sshd[233588]: Server listening on 0.0.0.0 port 22.
Dec 28 13:38:52 test1 sshd[233588]: error: Bind to port 22 on :: failed: The socket name is already in use..
Dec 28 13:38:52 test1 sshd[233588]: error: Couldn't create pid file "/usr/local/etc/sshd.pid": A file or directory in the path name does not exist.
Dec 28 13:38:52 test1 tsm: 3004-035 TSM: write to /dev/vty2 failed.
Dec 28 14:09:23 test1 su: from root to oraprod at /dev/pts/0
Dec 28 14:50:33 test1 sshd[233588]: Received signal 15; terminating.
Dec 28 14:50:37 test1 sshd[233590]: Server listening on 0.0.0.0 port 22.
Dec 28 14:50:37 test1 sshd[233590]: error: Couldn't create pid file "/var/run/sshd.pid": A file or directory in the path name does not exist.
Dec 28 14:53:53 test1 su: from root to root at /dev/pts/0
Dec 28 14:53:58 test1 su: from root to oraprod at /dev/pts/0


Last edited by filosophizer; 12-28-2012 at 08:00 AM..
 

10 More Discussions You Might Find Interesting

1. Red Hat

X11 forwarding problem between 2 RHEL4 machines with SSH

X11 forwarding problem between 2 RHEL4 machines with SSH Already configured the following on both machines under /etc/ssh Under sshd_config: UsePAM no AllowTcpForwarding yes Under ssh_config: ForwardAgent yes ForwardX11 yes ForwardX11Trusted yes ----------------------------- Using... (1 Reply)
Discussion started by: panggou
1 Replies

2. AIX

Printing problem in AIX machines running SAP

Hi all, We have a intermittent problem with printing from SAP running on AIX5.2 . Version of Sap is 4.6b. When a print is fired from SAP, the spool is created fine and then transferred to the host spool system (in this case the AIX Print queue). The problem seems to be happening when AIX... (3 Replies)
Discussion started by: pauldavi26
3 Replies

3. AIX

Passwordless authentication via SSH

I am trying to implement passwordless authentication via ssh2. I have used the well documented technique of generating a key pair with a blank passphrase on my client machine, and installing the public key on the destination server (AIX 5.3) in the user's .ssh2 directory. I have used this technique... (1 Reply)
Discussion started by: RegX
1 Replies

4. HP-UX

Help on passwordless ssh...

Hi, Can someone help me on ssh-keygen usage...? I used ssh-keygen after which "id.pub" file was generated in system1's > .ssh directory... I copied the same into the remote system system2 > .ssh directory as "authorized_keys" file. Now i tried ssh connection from system 1 to system... (7 Replies)
Discussion started by: EmbedUX
7 Replies

5. Shell Programming and Scripting

ssh passwordless

Hi, I want to login to a remote server and sftp files without password prompting. So, I created private-public key pair as follows: user1@server1.com .ssh]$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/user1/.ssh/id_rsa): Enter... (7 Replies)
Discussion started by: dips_ag
7 Replies

6. UNIX for Dummies Questions & Answers

passwordless ssh

hi, i have tried with passwordless shh in google.. i followed the below steps ... user:~> ssh-keygen -t rsa Enter file in which to save the key (/home/cantin/.ssh/id_rsa):key.txt Enter passphrase (empty for no passphrase): Enter same passphrase again: till this step i... (0 Replies)
Discussion started by: arunmanas
0 Replies

7. Red Hat

Passwordless SSH from Linux to AIX

Hi, I am trying to setup passwordless SSH from Redhat Linux EL 5 to AIX 6 and it worked for few boxes and didn't for few other. Not sure as to why it's happening. Pl find below the log when i run ssh in verbose mode. TIA Reddy # ssh -v aixora04 OpenSSH_4.3p2, OpenSSL... (3 Replies)
Discussion started by: reddyr
3 Replies

8. Shell Programming and Scripting

passwordless ssh

My main concern is, i have to login into 300 linux server and all are having same userid and password. I dont want to create any key for each server to login . Is there a way to run the shell script ? (3 Replies)
Discussion started by: Mani2512
3 Replies

9. UNIX for Advanced & Expert Users

passwordless ssh connection problem

I need to ssh from Host A to Hosts B and C. A->B works, but A->C does not. I can do rcp/rcmd A->B and A->C. B and C are identical systems. All three are SCO OSR 5. More relevant info: Host A$ ssh -V OpenSSH_3.8p1, SSH protocols 1.5/2.0, OpenSSL 0.9.7d 17 Mar 2004 Hosts B and C are:... (5 Replies)
Discussion started by: migurus
5 Replies

10. UNIX for Advanced & Expert Users

Passwordless ssh

Hi I have created a user on a linux server and created a passwordless ssh key. I've echoed the key into the authorized_keys file for the user. I've added a series of forced commands to the key. From my laptop - logged in as myself - I can ssh into the server as that user and the commands... (3 Replies)
Discussion started by: steadyonabix
3 Replies
All times are GMT -4. The time now is 04:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy