Port Forwarding

Advertisement

MichaelW
Guest

Port Forwarding

I often use WinSCP in combination with VNC. While WinSCP is responsible for file transferring I use VNC as remote desktop functionality. Since the server to which I connect is secure the VNC service is also reachable through an ssh tunnel with port forwarding.

So I connect with WinSCP (Connection through Tunnel since the server is not direct reachable) to get the file connection. After that I use two PuTTY sessions (two because PuTTY has no direct tunnel function). The last PuTTY session has port forwarding enabled and forwards the VNC port to a local port to allow the VNC client to connect.

This is a bit complicated, is there a way to set port forwardings directly in WinSCP?

Greetings,
Michael

Reply with quote

Advertisement

Guest

Hello Martin,

no that's not the intended use in this case. But I also very often use the PuTTY toolbar button to start PuTTY directly from WinSCP. The advantage of this usage is that PuTTY starts up already logged in with the authentication data from WinSCP.
In PuTTY it is possible to specify some port forwarding rules. Maybe it is possible to load a PuTTY profile with this port forwarding rules when I'm clicking this toolbar symbol.
Is this workaround possible in WinSCP, maybe to give PuTTY the right command line options?

Greetings,
Michael

Reply with quote

datacompboy
Guest

port forward

Since WinSCP use PuTTY core for SSH, may be add additional port forwardings for connection settings?
So it will also start SCP transfer, and VNC / Xforward ports for testing.
It will be really helpful – since one empty PuTTY run only for portforward, when only one connection need.

Reply with quote

Advertisement

diegotolentino
Joined:
Posts:
4

I'm create a Custom commands to solve my problem with port forward the result is like
https://www.bitvise.com/port-forwarding

The script require plink.exe
https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
  1. Open the winscp.exe
  2. Select the "Advanced Options"
  3. Go Preferences > Commands
  4. Click "Add ..."
  5. In Description put: "Mapear Porta"
  6. In Custom command:
    plink -l !U -pw !P -load "WinSCP temporary session" -L !?Endereço Local:?127.0.0.1!:!?Porta Local:?22!:!?Endereço Remoto:?127.0.0.1!:!?Porta Remota:?22!
  7. Click "Local command"
  8. Click "OK"
  9. See new button win Tab

Reply with quote

Advertisement

thelr
Guest

Feature request vote

It would be great to be able to configure port forwarding with WinSCP sessions rather than keeping a separate folder of batch files to start plink tunnels. +1

Reply with quote

Guest

Hi Martin,
Can you suggest me to open PuTTY session through WinSCP commands,
My requirement is to pass the WinSCP command like mount -o remount,rw / without opening PuTTY manually.
All these things to be done with WinSCP command/settings/configuration

Reply with quote

Advertisement

Guest

HI Martin,

As per link you mentioned above I need to open WinSCP to enter the commands.....
I just wanted to automate the file transfers without opening WinSCP, through script.
upto some extent I performed the file transfer operation except PuTTY session.

Regards,
Raj

Reply with quote

Guest

Hi @Martin,

Yes I prepared the script file like this.
sftprun.cmd:
D:\winscp\winscp.com /script=D:\winscp_auto\sftpscriptJAC.txt
Can you please suggest me to open PuTTY through above mentioned script.

The PuTTY details should be provided under the script file sftpscriptJAC.

Thanks,
Raj

Reply with quote

martin
Site Admin
martin avatar

Why do you want to open PuTTY? You wrote that you want to automate file transfers. PuTTY cannot transfer files.

Reply with quote

Advertisement

Guest

Hi @Martin,
Yes, PuTTY cannot transfer files, but if you want to delete/rename/move files of remote machine then we need to give the read and write permissions for those (permissions in the sense it is different from 0777)

Normally we used to open PuTTY session manually and then we pass this command
mount -o remount,rw /
Else is there any other way to perform these actions, please suggest.....

Thanks,
Rajendra.

Reply with quote

Advertisement

You can post new topics in this forum