Reputation: 134
I'm trying to deploy some code with PHPStorm using sftp. I need to use an ssh proxy to do so. Now in the terminal this is no problem: I add a few lines in the .ssh/config file (Namely: ProxyCommand ssh [...]) and everything works fine. But PHPStorm seems to ignore any configurations in the .ssh/config file.
The question: Is it possible in PHPStorm to configure an SSH-Proxy or can I tell PHPStorm to use the .ssh/config file like any other program that uses ssh?
Best regards.
Upvotes: 4
Views: 7984
Reputation: 424
I managed to connect to target server through middle server using PhpStorm by issuing following command through commandline
ssh -L 2222:target-server.com:22 middleserver.com
and using following settings in PhpStorm
and in PhpStorm host: localhost port: 2222 username/password as required for target server
Upvotes: 4
Reputation: 115
I was able to make this work on PhpStorm 2018.1.2 by a combination of ProxyCommand and ssh tunneling.
I set up my .ssh/config like this:
Host jumpserver
HostName jumpserver.example.com
User user
Host 10.0.0.*
ProxyCommand ssh jumpserver -W %h:%p
And then opened a tunnel using the following command
ssh 10.0.0.15 -L 2000:localhost:22 -N
Lastly enter localhost and port 2000 into your PhpStorm config settings
Upvotes: 1
Reputation: 181
@LazyOne is right, IDE does not using native ssh, which lead to ssh proxy does not work。
example:
after set up the proxy tunnel
shell code:
ssh -f -N -L 2203:host_ip_c:22 username@host_ip_b -p host_ip_b_port
I would be able setup direct ssh to host_ip_c by
shell code
ssh localhost -p 2203
but it did not work by IDE
Upvotes: 3
Reputation: 165188
Deployment through proxy (be it ordinary FTP or SFTP) is not currently supported.
https://youtrack.jetbrains.com/issue/WI-14953 -- watch this ticket (star/vote/comment) to get notified on progress (for SFTP).
Upvotes: 9