I am no longer successfully able to connect to my AIX LPAR.

ssh -v user@<ip>
OpenSSH_6.2p2, OpenSSL 1.0.1c 10 May 2012
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to <ip> [<ip>] port 22.
debug1: connect to address <ip> port 22: Connection refused
ssh: connect to host <ip> port 22: Connection refused

This was after attempting to make an sshd_config update take effect (potentially incorrectly) by running

stopsrc -s sshd
startsrc -s sshd

Prior to running the stop and start, I was able to connect, now it refuses as above. I still currently have one connection open, is there anything I can do to resolve/troubleshoot this?

I've already looked at ssh Connection refused: how to troubleshoot? thread, but I am unable to figure out basic things like whether or not the SSH daemon is running (I don't think it is) or how to start it if it is not... ps -ax did not recognize x as a flag... (edited based on comments)

user1@<host>:/usr/sbin > ps -ef | grep ssh
    root  5046410        1   0 09:37:38     -  0:00 sshd: user1 [priv]
    root  5374164        1   0 13:28:03     -  0:00 sshd: user1 [priv]
    user2 5832758 11141204   0 16:25:39     -  0:00 sshd: user2@pts/0
    user1 7340048  9175212   0 09:37:40     -  0:00 sshd: user1@notty
    root  9175212        1   0 09:37:40     -  0:00 sshd: user1 [priv]
    user1 11075776 5046410   2 09:37:40     -  0:01 sshd: user1@pts/1
    root  11141204       1   0 16:25:33     -  0:00 sshd: user2 [priv]

How can I connect to this LPAR again? Any help is very much appreciated!

  • AIX is SYSV, so you should use ps -ef to list app processes instead. Commented Apr 3, 2014 at 18:56
  • @AlanShutko thanks for the tip, should I do ps -ef | grep ssh in this case? Commented Apr 3, 2014 at 18:58
  • yes, that will work. Commented Apr 3, 2014 at 18:59

1 Answer 1


After finding sshd process inoperative, I noticed that something similar is happening, but instead of a missing module, it was something with sshd_config.

Check status of the daemon:

user1@<host>:/usr/sbin > lssrc -s sshd
Subsystem         Group            PID          Status
 sshd             ssh                           inoperative

Attempt to manually start (using absolute path) :

user1@<host>:/usr/sbin > /usr/sbin/sshd
/etc/ssh/sshd_config: line 1: Bad configuration option: penBSD:
/etc/ssh/sshd_config: terminating, 1 bad configuration options

Turns out this file was incorrectly removed earlier (prior to sshd restart attempt), but new file was created to be an exact copy of another machine (or so we thought, it was actually a bad copy/paste job). Based on the line 1 error, we updated:

penBSD: sshd_config,v 1.80 2008/07/02 02:24:18 djm Exp $


#   $OpenBSD: sshd_config,v 1.80 2008/07/02 02:24:18 djm Exp $

Not only can we now connect properly, the configuration change we were trying to make in the 1st place to enable X11 forwarding seems to have worked as well.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .