Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Non standard ssh port

Received: by 10.14.4.166 with SMTP id 38mr45577eej.18.1311276227792;
        Thu, 21 Jul 2011 12:23:47 -0700 (PDT)
X-BeenThere: vagrant-up@googlegroups.com
Received: by 10.14.11.100 with SMTP id 76ls179583eew.0.gmail; Thu, 21 Jul 2011
 12:23:45 -0700 (PDT)
Received: by 10.14.47.2 with SMTP id s2mr44586eeb.39.1311276225727;
        Thu, 21 Jul 2011 12:23:45 -0700 (PDT)
Received: by 10.14.47.2 with SMTP id s2mr44585eeb.39.1311276225703;
        Thu, 21 Jul 2011 12:23:45 -0700 (PDT)
Return-Path: <tmhai...@gmail.com>
Received: from mail-ew0-f52.google.com (mail-ew0-f52.google.com [209.85.215.52])
        by gmr-mx.google.com with ESMTPS id z64si1976027eez.3.2011.07.21.12.23.45
        (version=TLSv1/SSLv3 cipher=OTHER);
        Thu, 21 Jul 2011 12:23:45 -0700 (PDT)
Received-SPF: pass (google.com: domain of tmhai...@gmail.com designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of tmhai...@gmail.com designates 209.85.215.52 as permitted sender) smtp.mail=tmhai...@gmail.com; dkim=pass (test mode) header...@gmail.com
Received: by ewy28 with SMTP id 28so1353830ewy.25
        for <vagrant-up@googlegroups.com>; Thu, 21 Jul 2011 12:23:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :content-type;
        bh=EkSZQEbEdh6ORMTMrncD2Cd8AznY9sf2O3SJY38gvJ0=;
        b=k3XKeJLh70tAaRe/ovomq+J/h2T23/DFzR8eS9/GPy9DZUnp6S12y+RzIquDLk/s33
         xd4zyVUvH+aFNJapyF98rNrJTCPbutbqL/0FD8RLcXGKfQc8i2jYV53SxWOktyC3xOZJ
         ADC7n3K0Afge4YDdQSH7I2/8/iWZsaWmUg808=
Received: by 10.205.64.131 with SMTP id xi3mr177564bkb.353.1311276225428; Thu,
 21 Jul 2011 12:23:45 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.204.112.2 with HTTP; Thu, 21 Jul 2011 12:23:25 -0700 (PDT)
In-Reply-To: <CADs30hWTaN2fp0CpaQw3PVyM3=X_SgoP+3jjBNDE5_y2Y5AK8Q@mail.gmail.com>
References: <cc2f0895-128d-48a3-b175-defcd54a8f0e@u6g2000prc.googlegroups.com> <CADs30hWTaN2fp0CpaQw3PVyM3=X_SgoP+3jjBNDE5_y2Y5A...@mail.gmail.com>
From: Tim Haines <tmhai...@gmail.com>
Date: Thu, 21 Jul 2011 12:23:25 -0700
Message-ID: <CAO=-cOXqwd0zw+d_cukEKrz4LCkP==5urW5wyH7PDugfYu_...@mail.gmail.com>
Subject: Re: [vagrant-up] Non standard ssh port
To: vagrant-up@googlegroups.com
Content-Type: multipart/alternative; boundary=bcaec5430e249e7b7704a8994923

--bcaec5430e249e7b7704a8994923
Content-Type: text/plain; charset=ISO-8859-1

Thanks for the responses Nathan and Marco,

I know the default is config.vm.forward_port("ssh", 22, 2222, :auto => true)
- I changed the 22 to 30002.

Also, I've checked the iptables are configured for 30002 to be open, and
restarted ssh on the vm after I made the port change.

So it sounds like there's not anything obvious that I'm missing?  It appears
that vagrant isn't observing the ssh port forwarding rule, but I can't be
sure that's what is going on ..


Tim.

On Thu, Jul 21, 2011 at 12:04 PM, Marco De Bortoli <
marco.pk.debort...@gmail.com> wrote:

> Ops sorry actually the configuration you wrote, is forwarding the guest
> port 30002 to the host 2222 one which sounds obviously even more strange to
> me.
> By default a ssh forwarding with default ssh service configuration should
> look like this:
>
> config.vm.forward_port("ssh", 22, 2222, :auto => true)
>
> Where 22 is the default ssh port listening in the guest and 2222 the
> forwarded port in the host machine.
>
> Does it make sense?
>
>
> On 21 July 2011 20:43, Tim Haines <tmhai...@gmail.com> wrote:
>
>> Hi there,
>>
>> I've tried changing the ssh port on my vm to 30002, but after I do
>> that, I can no longer get vagrant to talk to it.
>>
>> I've added the port mapping in the Vagrant file, like so:
>>
>>  config.vm.forward_port("ssh", 30002, 2222, :auto => true)
>>
>> Is there anything else I need to do get vagrant to reload/provision/
>> ssh successfully after that?
>>
>> Cheers,
>>
>> Tim.
>
>
>

--bcaec5430e249e7b7704a8994923
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Thanks for the responses Nathan and Marco,<div><br></div><div>I know the de=
fault is=A0<meta charset=3D"utf-8"><span class=3D"Apple-style-span" style=
=3D"border-collapse: collapse; font-family: arial, sans-serif; font-size: 1=
3px; ">config.vm.forward_port(&quot;ssh&quot;, 22, 2222, :auto =3D&gt; true=
) - I changed the 22 to 30002.</span></div>

<div><font class=3D"Apple-style-span" face=3D"arial, sans-serif"><span clas=
s=3D"Apple-style-span" style=3D"border-collapse: collapse;"><br></span></fo=
nt></div><div><font class=3D"Apple-style-span" face=3D"arial, sans-serif"><=
span class=3D"Apple-style-span" style=3D"border-collapse: collapse;">Also, =
I&#39;ve checked the iptables are configured for 30002 to be open, and rest=
arted ssh on the vm after I made the port change.<br>

</span></font></div><div><font class=3D"Apple-style-span" face=3D"arial, sa=
ns-serif"><span class=3D"Apple-style-span" style=3D"border-collapse: collap=
se;"><br></span></font></div><div><font class=3D"Apple-style-span" face=3D"=
arial, sans-serif"><span class=3D"Apple-style-span" style=3D"border-collaps=
e: collapse;">So it sounds like there&#39;s not anything obvious that I&#39=
;m missing? =A0It appears that vagrant isn&#39;t observing the ssh port for=
warding rule, but I can&#39;t be sure that&#39;s what is going on ..</span>=
</font></div>

<div><font class=3D"Apple-style-span" face=3D"arial, sans-serif"><span clas=
s=3D"Apple-style-span" style=3D"border-collapse: collapse;"><br></span></fo=
nt></div><div><font class=3D"Apple-style-span" face=3D"arial, sans-serif"><=
span class=3D"Apple-style-span" style=3D"border-collapse: collapse;"><br>

</span></font></div><div><font class=3D"Apple-style-span" face=3D"arial, sa=
ns-serif"><span class=3D"Apple-style-span" style=3D"border-collapse: collap=
se;">Tim.<br></span></font></div><div><div class=3D"gmail_quote"><br></div>=
<div class=3D"gmail_quote">

On Thu, Jul 21, 2011 at 12:04 PM, Marco De Bortoli <span dir=3D"ltr">&lt;<a=
 href=3D"mailto:marco.pk.debort...@gmail.com">marco.pk.debort...@gmail.com<=
/a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:=
0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Ops sorry actually the configuration you wrote, is forwarding the guest por=
t 30002 to the host 2222 one which sounds obviously even more strange to me=
.<div>By default a ssh forwarding with default ssh service configuration sh=
ould look like this:</div>


<div><br></div><div>config.vm.forward_port(&quot;ssh&quot;, 22, 2222, :auto=
 =3D&gt; true)</div><div><br></div><div>Where 22 is the default ssh port li=
stening in the guest and 2222 the forwarded port in the host machine.</div>


<div><br></div><div>Does it make sense?</div><div><div></div><div class=3D"=
h5"><div><br></div><div><br><div class=3D"gmail_quote">On 21 July 2011 20:4=
3, Tim Haines <span dir=3D"ltr">&lt;<a href=3D"mailto:tmhai...@gmail.com" t=
arget=3D"_blank">tmhai...@gmail.com</a>&gt;</span> wrote:<br>


<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">Hi there,<br>
<br>
I&#39;ve tried changing the ssh port on my vm to 30002, but after I do<br>
that, I can no longer get vagrant to talk to it.<br>
<br>
I&#39;ve added the port mapping in the Vagrant file, like so:<br>
<br>
 =A0config.vm.forward_port(&quot;ssh&quot;, 30002, 2222, :auto =3D&gt; true=
)<br>
<br>
Is there anything else I need to do get vagrant to reload/provision/<br>
ssh successfully after that?<br>
<br>
Cheers,<br>
<font color=3D"#888888"><br>
Tim.</font></blockquote></div><br></div>
</div></div></blockquote></div><br></div>

--bcaec5430e249e7b7704a8994923--