LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-30-2006, 02:26 AM   #1
sunhui
Member
 
Registered: Jan 2006
Location: taiwan
Posts: 156

Rep: Reputation: 30
Remote shell problem


I have setup the ssh between two servers, server A has generated a public key and copy it to server B , and have setup the remote host , all work well , but now when use "ssh serverB -l user" , then pop "Connection closed by serverB" , when use "Connection closed by serverB ,lost connection" , can advise what is the possible reason ? thx.
 
Old 08-30-2006, 07:24 AM   #2
keyF
Member
 
Registered: Jan 2006
Location: Moscow
Distribution: Debian, RHEL, FreeBSD, CentOS
Posts: 38

Rep: Reputation: 15
1. try to connect from serverB to A.
2. what is on the logs of serverB (in your example)?
 
Old 08-30-2006, 10:23 AM   #3
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
When does "Connection closed" pop up? Immediately, or after you've started some authentication?

As keyF suggested, check the logs on serverB. Location may vary by distro. Mine are in /var/log/auth.log, but yours could be elsewhere depending on your syslog setup.

Also, from serverA try "ssh serverB -vv -l user" (add a "double v" option to the command line to indicate "very verbose"). You should be able to see what it's doing when serverB closes the connection.

If you can't interpret the verbose output from ssh, post it here and maybe somebody can help debug it for you.

Also check /etc/hosts.allow and /etc/hosts.deny for anything that might be denying the connection.

Also, "iptables --list" for firewall things that might be blocking you.

Also, is sshd even running on serverB? On the port you are expecting it on? Check with "ps -ef | grep sshd" and "netstat -anp | grep LISTEN | grep sshd"

You will need to be root to run the -p option for netstat, and to run the iptables command. Probably to look at auth.log too (if your system is configured securely).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
remote shell times out mjm461 Linux - Software 1 10-25-2005 11:53 AM
Remote Shell from Linux to Solaris? Zombie13 Linux - Newbie 2 04-21-2005 12:10 AM
RSH (remote shell) maseby Linux - Newbie 1 01-22-2005 07:54 PM
remote shell account services robert644 General 1 12-22-2004 09:41 PM
remote shell error message slice4e Linux - General 1 05-12-2003 08:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration