× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



hi Rob,

Hmmm... this doesn't appear to be related to Putty.

The error message is telling you that you already have a program that's listening for new connections on port 22. If I understand you correctly, you have an sftp server from Linoma (since sftp is a sub-component of SSH, it makes perfect sense that it would also run on port 22.)

Or, perhaps someone has already run STRTCPSVR *SSHD... (Which is the recommended way to start sshd on IBM i 6.1 or newer. Starting it via PASE/QShell would've been the recommended approach for older releases. Please do NOT use QP2SHELL to start it... either use STRQSH (QShell) or
QP2TERM (PASE). QP2SHELL uses ILE stdio descriptors, which can cause problems with sshd.

Perhaps the easiest workaround to your "address already in use" error is to run the OpenSSH program (sshd) on a different port number. Port 22 is the default one, but you can override it with the -p switch. For example:

QSH CMD('/QOpenSys/usr/sbin/sshd -p 22022')


This starts sshd on port 22022 instead of the default port 22. When you run Putty, you'll need to specify the port in the Putty window as well (it should default to port 22 for ssh, but you can change it to 22022.)

If you're going to use your system as an SSH (or SFTP) server for other clients, such as the command-line ssh, scp or sftp tools, the same thing applies, i.e. you'll need to specify an alternate port number when you run those tools as well.

-SK


On 7/26/2012 2:19 PM, rob@xxxxxxxxx wrote:
I ran
SBMJOB CMD(CALL QP2SHELL PARM('/QOpenSys/usr/sbin/sshd')) JOB(SSHD)
JOBQ(QUSRNOMAX)
WRKACTJOB SBS(QUSRWRK)
shows one SSHD job running. This part in the joblog concerns me:
sshd[21689]: error: Bind to port 22 on 0.0.0.0 failed: The socket name is
already in use..
sshd[21689]: Server listening on :: port 22.

netstat *cnn shows it using 208.87.xxx.yyy. nslookup shows that address
is our sftp server. That job
Status of job . . . . . . . . . . . . . . . : ACTIVE
Current user profile . . . . . . . . . . . : ROB
Job user identity . . . . . . . . . . . . . : ROB
Set by . . . . . . . . . . . . . . . . . : *SYSTEM
Entered system:
Date . . . . . . . . . . . . . . . . . . : 07/03/12
Time . . . . . . . . . . . . . . . . . . : 14:50:14
Started:
Date . . . . . . . . . . . . . . . . . . : 07/03/12
Time . . . . . . . . . . . . . . . . . . : 14:50:14
Subsystem . . . . . . . . . . . . . . . . . : GASERVICES
Subsystem pool ID . . . . . . . . . . . . :
is Linoma's stuff. However I am trying to open a putty client not to our
sftp server but that i itself. netstat *ifc shows a plethora of IP
addresses.

Is there a way to configure the ssh daemon used by the above SBMJOB to
link to a specific address and not to all?
Is this what I have to get working to allow me to use my putty client and
bypass "Network error: Connection refused"?


Rob Berendt



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.