0

My computer network is closed to ssh to external machines (outside the network) through port 22. I have a round about by tunneling ssh through http by employing cockscrew. I modified my config file in the following fashion

Host EXTERNAL-HOSTNAME
ControlMaster auto
ControlPath ~/.ssh/%r@%h:%p
ServerAliveCountMax=30
ServerAliveInterval=5
ProxyCommand corkscrew LOCAL-PROXYNAME PROXY-PORT-NO %h %p

How can I now use tramp to access the files in the remote cluster? The regular command /ssh:username@EXTERNAL-HOSTNAME fails to open the file.

UPDATE 1:

My proxy does not use the default 8080 port but a different port number. So using

/tunnel:PROXY-HOSTNAME PROXY-PORT-NO | ssh:USERNAME@EXTERNAL-HOSTNAME:~/

gave me the following error

Tramp: Opening connection for tunnel using scp... Tramp: Sending command exec ssh -o ControlPath=/var/folders/k5/r4f1q8j90y345rsz_9skc7y48q0jr6/T/tramp.15685eSq.%r@%h:%p -o ControlMaster=auto -o ControlPersist=no -e none tunnel' Tramp: Waiting for prompts from remote shell... Tramp failed to connect. If this happens repeatedly, try M-x tramp-cleanup-this-connection' Tramp: Waiting for prompts from remote shell...failed Tramp: Opening connection for tunnel using scp...failed Use M-x make-directory RET RET to create the directory and its parents

Tramp: Checking `vc-registered' for /tunnel:PROXY-HOSTNAME PROXY-PORT-NO | ssh:USERNAME@EXTERNAL-HOSTNAME:~/...failed Use M-x make-directory RET RET to create the directory and its parents Mark set

UPDATE 2:

It worked. The only problem was I was not entering the port-no correctly. Now I just used

/tunnel:PROXY-HOSTNAME#PROXY-PORT-NO|ssh:USERNAME@EXTERNAL-HOSTNAME:~/

and it worked.

rambalachandran
  • 2,091
  • 2
  • 19
  • 34

1 Answers1

3

I don't know corkscrew so I cannot answer for this. However, Tramp is able to tunnel http by its own. Try to open /tunnel:LOCAL-PROXYNAME|ssh:username@EXTERNAL-HOSTNAME. The proxy command shall be removed from your ssh config, of course.

Michael Albinus
  • 1,571
  • 9
  • 19
  • Thank you for the answer. I still get an error which I have updated in the question – rambalachandran Feb 05 '15 at 13:39
  • In this case it might be simpler you send a Tramp bugreport via `M-x tramp-bug`. Please set `tramp-verbose` to 10 prior running the test, and add the resulting Tramp debug buffer to the bug report. – Michael Albinus Feb 06 '15 at 07:55