How to set port forwarding from SSH Server to Web Server?
How to set port forwarding from SSH Server to Web Server?
How to set port forwarding from SSH Server to Web Server?
I have a web server to accept some html file and I need to add SSH server for security channel.
I have checked the sample, there only has SSH Client sample to show the port forwarding.
How to make SSH Server(22) port forward to Web Server(80)?
Thanks!
I have a web server to accept some html file and I need to add SSH server for security channel.
I have checked the sample, there only has SSH Client sample to show the port forwarding.
How to make SSH Server(22) port forward to Web Server(80)?
Thanks!
The SSH operation principle is the next: data from SSH client is transmitted to SSH server in secure form. SSH server decodes the data and transmits it in plain form to the specified host and port, to which point TScSSHChannel.DestHost and TScSSHChannel.DestPort correspondingly.
When local port forwarding, TScSSHChannel listens to the port specified in TScSSHChannel.SourcePort, receives data, encodes and transmits it to the server. Server decodes data and transmits it further.
You can find more detailed information about it in the SecureBridge help.
Seemingly, you should setup the client in the following way:
ScSSHCient.HostName := SSHServerHost;
ScSSHCient.Port := 22;
ScSSHChannel.DestHost := WebServer;
ScSSHChannel.DestPort := 80.
If WebServer and SSH server are located on the same computer, you can specify 'localhost' in ScSSHChannel.DestHost.
When local port forwarding, TScSSHChannel listens to the port specified in TScSSHChannel.SourcePort, receives data, encodes and transmits it to the server. Server decodes data and transmits it further.
You can find more detailed information about it in the SecureBridge help.
Seemingly, you should setup the client in the following way:
ScSSHCient.HostName := SSHServerHost;
ScSSHCient.Port := 22;
ScSSHChannel.DestHost := WebServer;
ScSSHChannel.DestPort := 80.
If WebServer and SSH server are located on the same computer, you can specify 'localhost' in ScSSHChannel.DestHost.
I am using ScSSHServer for SSH Server.
After receive data from SSH Server, I have to redirect the data into Web Server.
I have checked the sample program for ScSSHClient for port forwarding.
However, how to make SSH Server (ScSSHServer) to do port forwarding?
I cannot find ScSSHServer can call ScSSHChannel.
After receive data from SSH Server, I have to redirect the data into Web Server.
I have checked the sample program for ScSSHClient for port forwarding.
However, how to make SSH Server (ScSSHServer) to do port forwarding?
I cannot find ScSSHServer can call ScSSHChannel.
Web client is a machine which will generate html file periodically.
SSH Client is Open SSH run under Linex.
Web Client SSH Client SSH Server Web Server
Web Client will iniate to transfer to data file to Web Server through SSH.
When Web Server process the data file, it will send a message 'OK' back to Client through SSH.
Now, when Client try to connect, it show
'Format of Server Version is invalid' and the connection is hang.
Thanks!
SSH Client is Open SSH run under Linex.
Web Client SSH Client SSH Server Web Server
Web Client will iniate to transfer to data file to Web Server through SSH.
When Web Server process the data file, it will send a message 'OK' back to Client through SSH.
Now, when Client try to connect, it show
'Format of Server Version is invalid' and the connection is hang.
Thanks!
You can setup your SSH client for port forwarding in the following way:
ssh -L SourcePort:WebServerHost:80 username:SSHServerHost,
where
SourcePort - local port number, which will be listened (e.g. 5001);
UserName - user name for SSH connetion.
After that setup your Web client to connection to SourcePort on localhost.
ssh -L SourcePort:WebServerHost:80 username:SSHServerHost,
where
SourcePort - local port number, which will be listened (e.g. 5001);
UserName - user name for SSH connetion.
After that setup your Web client to connection to SourcePort on localhost.
I have a simple Web Server. Before Web Server, I add the SSH Server (develop with securebridge ScSSHServer)
When file pass through SSH Server, I want the files go to web server.
Since I use ScSSHServer which do not have port forwarding, how can I transfer the file to Web server?
I have checked ScSSHClient can make port forwarding but not to ScSSHServer.
When file pass through SSH Server, I want the files go to web server.
Since I use ScSSHServer which do not have port forwarding, how can I transfer the file to Web server?
I have checked ScSSHClient can make port forwarding but not to ScSSHServer.
If you want an SSH server to transfer data to another addressee, you have to send data to the SSH server by an SSH client with settings like described above. Data between SSH Client and SSH server is transferred in an encrypted form.
If you just need to forward data from one port to another port, you should not use SecureBridge. You just need to write a program that receives data from the first port and writes it to another port.
If you just need to forward data from one port to another port, you should not use SecureBridge. You just need to write a program that receives data from the first port and writes it to another port.