unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Suvayu Ali <fatkasuvayu+linux@gmail.com>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: Emacs mailing list <help-gnu-emacs@gnu.org>
Subject: Re: Using tramp to connect to a remote emacs session
Date: Fri, 04 Sep 2009 04:05:09 -0700	[thread overview]
Message-ID: <4AA0F465.7030504@gmail.com> (raw)
In-Reply-To: <nqbplrmbt6.fsf@alcatel-lucent.de>

Hi Michael,

On Friday 04 September 2009 12:03 AM, Michael Albinus wrote:
> Suvayu Ali<fatkasuvayu+linux@gmail.com>  writes:
>
>> Correct me if I go wrong, when I issue that command emacsclient tells
>> the remote server to connect with the localhost over tramp. It
>> determines where the remote server is from the server file.
>
> Yes.
>
>> My problem is my ISP at the local machine doesn't allow me to login to
>> it from outside. In other words I probably don't have a static ip. So
>> when I issue the command I get,
>>
>>> $ emacsclient /ssh:user@local.host:~/file
>>> emacsclient: connect: Connection refused
>>> emacsclient: connected to remote socket at xxx.xx.xxx.xx
>>> Waiting for Emacs...
>>>
>>> *ERROR*: Process died
>
> So at least emacsclient was able to connect your remote server. Good.
>
>> And on the remote machine I get the following in the *Messages* buffer,
>>
>>> Tramp: Opening connection for user@local.host using ssh...
>>> Tramp: Waiting 60s for local shell to come up...
>>> Tramp: Sending command `ssh local.host -l user  -q -e none&&  exit || exit'
>>> Tramp: Waiting for prompts from remote shell
>>> File error: Process died
>
> That I do not catch. Are the messages exactly as you have written, or
> did you exchange the real user and host name by "user" and "local.host"?
>
My lab is a bit paranoid about security so I edited out the specifics 
and put in generic names. :)

> Note, that "user" shall be the user name you run your local host, and
> "local.host" must be an FQDN of your host, or an IP address.
>
The host name for my localhost is limited to the local network. The 
Siemens router from my ISP (Telus) probably implements some kind of NAT 
(I'm not sure). So the outgoing connection worked, whereas the incoming 
connection failed.

>> So to summarize my problem is I can only connect one way, local.host to
>> remote machine, and hence tramp fails to work. Does this mean the only
>> way I will get this working is to get my ISP to give me a static ip?
>
> You have mentioned two different explanations. Either your ISP does not
> allow you to login from the outside. Then we could stop. But usually,
> they don't forbid it.
>

I don't have a static IP, moreover from the outside I can only see my 
ISP's servers not my home machine. Hence I can't login from the outside.

> If you have a dynamic IP address (the other possiblitiy), you could run
>
>    emacsclient /ssh:user@1.2.3.4:/file/to/edit
>
> "1.2.3.4" would be the IP address you are currently using. Because this
> changes day by day, you might evaluate it every time in a script,
> starting emacsclient.
>
> The more simple solution is to register your local machine with dynamic
> DNS. Let's say you have registered it at http://www.dyndns.com/, under
> the name "suvayu.homelinux.org" (just as example). Then you could
> connect via
>
>    emacsclient /ssh:user@suvayu.homelinux.org:/file/to/edit
>

This is very interesting. I had no idea such a service existed! I will 
definitely look into this.

> Another trap you could enter is your router configuration at home. You
> must allow incoming connections at port 22 (for ssh), and it must be
> forwarded to your local host.
>

I can login to my router's admin interface, so that should not be 
difficult to setup.

Thanks for your patience. :)

-- 
Suvayu

Open source is the future. It sets us free.




  reply	other threads:[~2009-09-04 11:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-02 23:06 Using tramp to connect to a remote emacs session Suvayu Ali
2009-09-03  8:02 ` Peter Dyballa
2009-09-03 16:06   ` Suvayu Ali
     [not found]   ` <mailman.5952.1251993987.2239.help-gnu-emacs@gnu.org>
2009-09-03 16:34     ` Anselm Helbig
2009-09-04  3:17       ` Suvayu Ali
     [not found]       ` <mailman.5986.1252034254.2239.help-gnu-emacs@gnu.org>
2009-09-04  3:27         ` Benjamin Andresen
2009-09-04 11:17           ` Suvayu Ali
2009-09-04 11:19           ` Suvayu Ali
2009-09-03 13:08 ` Michael Albinus
2009-09-03 16:01   ` Suvayu Ali
2009-09-04  7:03     ` Michael Albinus
2009-09-04 11:05       ` Suvayu Ali [this message]
2009-09-04 11:37         ` Michael Albinus
2009-09-05  5:29           ` Suvayu Ali
     [not found] ` <mailman.5940.1251983344.2239.help-gnu-emacs@gnu.org>
2009-09-03 17:50   ` Benjamin Andresen
2009-09-04 11:12     ` Suvayu Ali

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AA0F465.7030504@gmail.com \
    --to=fatkasuvayu+linux@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=michael.albinus@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).