1824881 Members
3925 Online
109675 Solutions
New Discussion юеВ

sftp port 22

 
SOLVED
Go to solution
so.nimda
Super Advisor

sftp port 22

Hi,

Is there a way of finding out the default sftp port (i.e. 22) that's used in a UX 11v2.3 server?

Is it in the ssh_config file?

In /etc/services file, there's a "sftp 115" entry. Does this mean that the default port of 22 is not being used but 115 instead?

I am confused about these entries. Are they referring to the same thing?

Thanks in advance.
7 REPLIES 7
Michael Steele_2
Honored Contributor
Solution

Re: sftp port 22

Hi

115 SFTP

http://www.iana.org/assignments/port-numbers

...is correct. This is used for batch encrypted file transfers. Not the same as logging in on port 22 SSH. Just a different network service.

Don't be confused. You recognize that one is a login while the other is not, right? The other port 115 is just a different network service. That's all.
Support Fatherhood - Stop Family Law
so.nimda
Super Advisor

Re: sftp port 22

Hi Michael,

Noted and thanks for your reply.

Is there a need for me to explicitly set anything to tell the server to use port 22 or by default it is already using port 22.

On the other hand, if I specifically do not want to use port 22, where should I define this "alternate" port?

Sorry if I am asking silly questions. I am trying to troubleshoot some sftp issues.

Thanks
Steven Schweda
Honored Contributor

Re: sftp port 22

> Is there a way of finding out the default
> sftp port (i.e. 22) that's used in a UX
> 11v2.3 server?

The answer to this depends on some (missing)
context. Do you mean the port on which the
SFTP server is listening, or the port which
SFTP client program will try to use by
default?

> http://www.iana.org/assignments/port-numbers

You mean where it says this?:

sftp 115/tcp Simple File Transfer Protocol
sftp 115/udp Simple File Transfer Protocol


Compare:

dy # man sftp

SFTP(1) SFTP(1)

NAME
sftp - secure file transfer program
[...]

"Secure" and "Simple" are spelled differently
for a reason.

> Are they referring to the same thing?

No. Very different.

"man ssh" explains how to specify a different
port, but the default is 22, and that holds
for SSH, and SCP, and SFTP, too.

> Is it in the ssh_config file?

That's yet another place where you could
specify a different port (for the client).

man ssh_config

Adding "-v" to an ssh or sftp command should
enable enough diagnostics to reveal which
port it's trying to use. For example:

dy # sftp -v dy
Connecting to dy...
OpenSSH_4.3p2-hpn, OpenSSL 0.9.7i 14 Oct 2005
HP-UX Secure Shell-A.04.30.006, HP-UX Secure Shell version
debug1: Reading configuration data /opt/ssh/etc/ssh_config
debug1: Connecting to dy [10.0.0.39] port 22.
[...]


The port on which the SSH (SCP, SFTP, ...)
_server_ listens is also normally 22, but
that default port number may be overridden by
a specification in the _server's_
configuration file.

man sshd
man sshd_config


> [...] UX 11v2.3 [...]

Huh? Actual "uname -a" output can be more
useful than defective interpretations.
Michael Steele_2
Honored Contributor

Re: sftp port 22

Hi

You can't change it. If another box wants to login via ssh, he is expecting port 22.

Everybody has the same map, this is the map.
Support Fatherhood - Stop Family Law
Steven Schweda
Honored Contributor

Re: sftp port 22

> You can't change it.

man ssh
man ssh_config
man sshd
man sshd_config

> Everybody has the same map, this is the map.

http://www.google.com/search?q=ssh+alternate+port

This must be some new meaning for
"everybody".
Michael Steele_2
Honored Contributor

Re: sftp port 22

Your Thorazine dispenser is hanging on the wall next to the bathroom sink.
Support Fatherhood - Stop Family Law
so.nimda
Super Advisor

Re: sftp port 22

Thanks Steven & Michael for your replies...