Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot login via telnet or ssh to AIX 5.2 server 1

Status
Not open for further replies.

pdtak

Technical User
Feb 25, 2008
63
0
0
US
I somehow modified the system so that no one can telnet or ssh into this box as any user including root. I might have blown away important files, I don't know.
Please let me know what I have to check to make it so that I can login.
This is what I get when I try to telnet or ssh:

telnet bk02
Trying...
Connected to bk02
Escape character is '^]'.
============
ssh user1@bk02
ssh_exchange_identification: Connection closed by remote host
Connection closed.
============
I'm not closing the current open window for fear of not being able to log back in.
Please help, thanks.
 
You're saying that you can't telnet or ssh to the box but I assume that you can still log in on the console.

By the output you're showing it looks like both telnetd and sshd are responding but then fail to log you in. To start checking you could run sshd in debug mode:

1. Stop the sshd daemon:

Code:
# stopsrc -s sshd

2. Start sshd with debug output:

Code:
# /usr/sbin/sshd -d

3. Try to connect using ssh from another box. If the other box also has openssh (and not some other flavor of ssh) then you can also switch on debug output on the client side:

Code:
$ ssh <server> -vvv <some command>
 
Thanks abubasim,
I found that key was corrupted, so I regenerated the key and it worked.
Thanks.
Paul
 

??

So you could log in then? This doesn't sound like the right explanation...
 
The explanation is:

I ran the ssh-keygen -t dsa

I did that and got following message

Enter file in which to save the key (/home/user1/.ssh/id_dsa): /home/user1/.ssh/id_dsa
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/user1/.ssh/id_dsa.
Your public key has been saved in /home/user1/.ssh/id_dsa.pub.
The key fingerprint is:
71:f5:3d:8f:ae:2a:73:9c:79:92:b0:35:ca:9a:2f:ed

I did not enter a passphrase

Then I copied this file to a remote machine to which I want to connect like this

scp /home/user1/.ssh/id_dsa user2@machine2:/home/user2/.ssh/authorized_keys

Then I ssh'd in from another machine into this machine ok.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top