Unable to look up default port for ssh on Windows

Asked by Nick Griffiths

I have a branch on both my local PC and a central repository, with which I communicate using SFTP. Whenever I enter a command that requires a URL (e.g. push, bind), bzr requires that I enter the SSH port number. If I don't specify the port, I get the following error:

bzr: ERROR: Unable to look up default port for ssh

It seems unusual to me that I should have to specify the port when I am using the default port 22. Should I file a bug report for this?

I am using bzr 1.15-1, installed using the Windows standalone installer.

An example:

C:\Documents and Settings\Nick\My Documents\nicks-project\trunk>bzr bind sftp://<email address hidden>/~/nicks-repository/trunk
Connected (version 2.0, client OpenSSH_4.3)
bzr: ERROR: Unable to look up default port for ssh

C:\Documents and Settings\Nick\My Documents\nicks-project\trunk>bzr bind sftp://<email address hidden>:22/~/nicks-repository/trunk
Connected (version 2.0, client OpenSSH_4.3)
SSH <email address hidden>:22 password:
Authentication (password) successful!
Secsh channel 1 opened.
[chan 1] Opened sftp connection (server version 3)
[/ ] sftp > 0KB 0KB/s |
C:\Documents and Settings\Nick\My Documents\nicks-project\trunk>

Question information

Language:
English Edit question
Status:
Answered
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Daniel Cassidy (djcsdy) said :
#1

I'm not affiliated with Bazaar, but this would appear to break the SSH/SFTP URI scheme spec, so IMHO it's a bug.

(see http://tools.ietf.org/html/draft-ietf-secsh-scp-sftp-ssh-uri-04 section 3.4)

Revision history for this message
John A Meinel (jameinel) said :
#2

I think you should file a bug on this, though I'm pretty confused as to why it isn't working for you.

From the looks of it, you are using 'paramiko' to connect to a remote OpenSSH machine. However, if you look at the specifics:

bzr bind sftp://<email address hidden>/~/nicks-repository/trunk
Connected (version 2.0, client OpenSSH_4.3)
bzr: ERROR: Unable to look up default port for ssh

It says that you've actually already connected to the remote machine. Certainly it has been able to find the remote host, and determine that it is an OpenSSH server (version 4.3).

Even weirder, that specific error string doesn't seem to occur in bzrlib nor in my copy of paramiko.

Could you, perhaps, run with 'bzr bind -Derror sftp:...' and include the traceback?

I'll go ahead and turn this question into a bug report.

Can you help with this problem?

Provide an answer of your own, or ask Nick Griffiths for more information if necessary.

To post a message you must log in.