Discussion:
[vagrant-up] Can you create SSH port forwarding tunnels or sftp/scp using the vagrant share plugin?
Eric B
2018-09-25 15:36:11 UTC
Permalink
I've just used the vagrant share plugin to setup an ssh tunnel to a remote
vagrant machine. This works great for shell access. But I have a few
questions:

Once I have an ssh tunnel up to the remote machine,can I create a port
forwarding tunnel to it? For example - something like:
ssh 8080:localhost:8080 <shared vagrant ip> ?

What about SCP or SFTP?

Finally, is there a way to open another ssh shell without needing to
relaunch the entire vagrant connect process (new vm/etc)? How can I run
new SSH connections thru the existing vm that vagrant connect setup for me?

Thanks,

Eric
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/28f9c404-8cd0-46b2-804a-08901cdcd21c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Alvaro Miranda Aguilera
2018-09-25 18:44:36 UTC
Permalink
hello

what you need to do?

because if you have ssh, some protocols like scp and sftp will work over
the same port, no need to use additional ports.


Alvaro,
Post by Eric B
I've just used the vagrant share plugin to setup an ssh tunnel to a remote
vagrant machine. This works great for shell access. But I have a few
Once I have an ssh tunnel up to the remote machine,can I create a port
ssh 8080:localhost:8080 <shared vagrant ip> ?
What about SCP or SFTP?
Finally, is there a way to open another ssh shell without needing to
relaunch the entire vagrant connect process (new vm/etc)? How can I run
new SSH connections thru the existing vm that vagrant connect setup for me?
Thanks,
Eric
--
This mailing list is governed under the HashiCorp Community Guidelines -
https://www.hashicorp.com/community-guidelines.html. Behavior in
violation of those guidelines may result in your removal from this mailing
list.
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/vagrant-up/28f9c404-8cd0-46b2-804a-08901cdcd21c%40googlegroups.com
<https://groups.google.com/d/msgid/vagrant-up/28f9c404-8cd0-46b2-804a-08901cdcd21c%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
Alvaro
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0eyUpYMD_-W37QeD%2BSKkZG4JDkdez-nwiVsgyc3giCZM_A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Eric B
2018-09-26 12:25:47 UTC
Permalink
I would think so too, but the connection didn't seem to allow for it. When
I try to connect to the ssh pretty exposed on my local VM (2222), I don't
even have a username, password or private key used to authenticate.

Every SCP/SFTP/ssh connection sets up a new connection, but I have no idea
how to authenticate and open a tunnel directly to the remote vagrant
machine without going through the temp VM (jump server) that vagrant spins
up on my end.

Thanks

Eric
Post by Alvaro Miranda Aguilera
hello
what you need to do?
because if you have ssh, some protocols like scp and sftp will work over
the same port, no need to use additional ports.
Alvaro,
Post by Eric B
I've just used the vagrant share plugin to setup an ssh tunnel to a
remote vagrant machine. This works great for shell access. But I have a
Once I have an ssh tunnel up to the remote machine,can I create a port
ssh 8080:localhost:8080 <shared vagrant ip> ?
What about SCP or SFTP?
Finally, is there a way to open another ssh shell without needing to
relaunch the entire vagrant connect process (new vm/etc)? How can I run
new SSH connections thru the existing vm that vagrant connect setup for me?
Thanks,
Eric
--
This mailing list is governed under the HashiCorp Community Guidelines -
https://www.hashicorp.com/community-guidelines.html. Behavior in
violation of those guidelines may result in your removal from this mailing
list.
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/vagrant-up/28f9c404-8cd0-46b2-804a-08901cdcd21c%40googlegroups.com
<https://groups.google.com/d/msgid/vagrant-up/28f9c404-8cd0-46b2-804a-08901cdcd21c%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
Alvaro
--
This mailing list is governed under the HashiCorp Community Guidelines -
https://www.hashicorp.com/community-guidelines.html. Behavior in
violation of those guidelines may result in your removal from this mailing
list.
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/vagrant-up/CAHqq0eyUpYMD_-W37QeD%2BSKkZG4JDkdez-nwiVsgyc3giCZM_A%40mail.gmail.com
<https://groups.google.com/d/msgid/vagrant-up/CAHqq0eyUpYMD_-W37QeD%2BSKkZG4JDkdez-nwiVsgyc3giCZM_A%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CA%2BT%2BPjFKS6h0pwDeV-PEAq68_HsRm%3DeYXBcazkst-We5rvq7jw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Alvaro Miranda Aguilera
2018-09-28 08:08:59 UTC
Permalink
Hello

one the VM is created, you can think of it as any other linux machine.

you can set the password you want, and create any user you need.
you can add any public key you want to be able to use to login.

Alvaro.
Post by Eric B
I would think so too, but the connection didn't seem to allow for it.
When I try to connect to the ssh pretty exposed on my local VM (2222), I
don't even have a username, password or private key used to authenticate.
Every SCP/SFTP/ssh connection sets up a new connection, but I have no idea
how to authenticate and open a tunnel directly to the remote vagrant
machine without going through the temp VM (jump server) that vagrant spins
up on my end.
Thanks
Eric
Post by Alvaro Miranda Aguilera
hello
what you need to do?
because if you have ssh, some protocols like scp and sftp will work over
the same port, no need to use additional ports.
Alvaro,
Post by Eric B
I've just used the vagrant share plugin to setup an ssh tunnel to a
remote vagrant machine. This works great for shell access. But I have a
Once I have an ssh tunnel up to the remote machine,can I create a port
ssh 8080:localhost:8080 <shared vagrant ip> ?
What about SCP or SFTP?
Finally, is there a way to open another ssh shell without needing to
relaunch the entire vagrant connect process (new vm/etc)? How can I run
new SSH connections thru the existing vm that vagrant connect setup for me?
Thanks,
Eric
--
This mailing list is governed under the HashiCorp Community Guidelines -
https://www.hashicorp.com/community-guidelines.html. Behavior in
violation of those guidelines may result in your removal from this mailing
list.
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google
Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send
To view this discussion on the web visit
https://groups.google.com/d/msgid/vagrant-up/28f9c404-8cd0-46b2-804a-08901cdcd21c%40googlegroups.com
<https://groups.google.com/d/msgid/vagrant-up/28f9c404-8cd0-46b2-804a-08901cdcd21c%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
Alvaro
--
This mailing list is governed under the HashiCorp Community Guidelines -
https://www.hashicorp.com/community-guidelines.html. Behavior in
violation of those guidelines may result in your removal from this mailing
list.
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/vagrant-up/CAHqq0eyUpYMD_-W37QeD%2BSKkZG4JDkdez-nwiVsgyc3giCZM_A%40mail.gmail.com
<https://groups.google.com/d/msgid/vagrant-up/CAHqq0eyUpYMD_-W37QeD%2BSKkZG4JDkdez-nwiVsgyc3giCZM_A%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
This mailing list is governed under the HashiCorp Community Guidelines -
https://www.hashicorp.com/community-guidelines.html. Behavior in
violation of those guidelines may result in your removal from this mailing
list.
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/vagrant-up/CA%2BT%2BPjFKS6h0pwDeV-PEAq68_HsRm%3DeYXBcazkst-We5rvq7jw%40mail.gmail.com
<https://groups.google.com/d/msgid/vagrant-up/CA%2BT%2BPjFKS6h0pwDeV-PEAq68_HsRm%3DeYXBcazkst-We5rvq7jw%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
Alvaro
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0exAguNNNBW3hu2JaJ6tWHZW1CKnApt5e%3DhzxJ6dcPjEuw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...