2
1
I don't even know how to explain this and the title might also be incorrect. But this is what I am trying to do,
I use an SFTP plugin Sublime Text which connects to by dev machine (lets call it D) and syncs the files on save.
When I am working from home, I cannot connect to my dev machine due to obvious security reasons. I have to connect to a bastion host (lets call it S) and then from S I have to ssh to D. This is cool, now I can run commands and use Vim.
However is there a way I could open up the SFTP port for my local machine to connect or the plugin to work. I think its called SSH Tunnel but I am not sure how do I do it.
The plugin makes use of Putty and Pageant (for ssh key) to connect/sync files.
Any help will be greatly appreciated.
Awesome thank you. So after running the ssh command, I go back to the sublime plugin and change the hostname from remote host to 127.0.0.1 and port to 2222 ? – Atif Mohammed Ameenuddin – 2014-11-25T12:30:54.697
@MartinPrikryl I think Putty in my question was a little misleading. I corrected it. – Atif Mohammed Ameenuddin – 2014-11-25T12:40:13.300
@Paul I get this error when I try to run the forwarding command user@10.196.xx.x's password: Permission denied (publickey,password,keyboard-interactive).
Although I am 100% sure the password I entered was correct. – Atif Mohammed Ameenuddin – 2014-11-25T12:40:32.067
@AtifMohammedAmeenuddin Sorry, I am not following this - where does the 10.196.x.x address come into it? The first ssh connection will be to a public address, the second sftp to the localhost 127.0.0.1 – Paul – 2014-11-25T12:43:52.117
Sorry let me clear it a bit, so made the first ssh connection. which worked fine. Then ran the ssh command to the actual host from inside the bastion host. It keeps asking me for password and then shows up that error
amohammed@88.88.88.88's password:
The 88.88.88.88 is a Windows machine. Could that be the reason? – Atif Mohammed Ameenuddin – 2014-11-25T12:49:37.240
@AtifMohammedAmeenuddin Both connections above originate from the first machine - the one external to the network you are connecting to. – Paul – 2014-11-25T12:51:21.733
Still the same problem. I get a long warning message
****USAGE WARNING**** this is a personal computer bla bla bla
.. and then it saysuser@88.88.88.88's password:
– Atif Mohammed Ameenuddin – 2014-11-25T12:57:30.243@AtifMohammedAmeenuddin Are you replacing 88.88.88.88 with your servers public IP? – Paul – 2014-11-25T22:22:51.613
Haha yes. Well actually it worked. For some reason I'm getting that error (maybe companys policies). But when I went into my text editor and replaced SFTP settings to 127.0.0.1 and port 2222. It worked. Thanks a lot pal! – Atif Mohammed Ameenuddin – 2014-11-25T23:57:18.347