Flex Tron
asked on
to connect to a SFTP site from a Red Hat server 'server A' and fetch some files via a Router
Dear Gurus,
I have a situation where I need to connect to a SFTP site from a Red Hat server 'server A' and fetch some files.
There is a a dedicated lease line via a router (Router B) which can let me connect to this sftp site. (Server Site C)
I can do a telnet succesfully to the B from A at port 30206
telnet B 30206
#Successfully connected to B
Now we need to do a sftp pull.
I sent my Server A public keys and the guy says he has placed it in Site C
We don't own the router B but its part of our company network.
I tried
It asks for a password"
Not sure how can we connect to the Site C via router B
I have a situation where I need to connect to a SFTP site from a Red Hat server 'server A' and fetch some files.
There is a a dedicated lease line via a router (Router B) which can let me connect to this sftp site. (Server Site C)
I can do a telnet succesfully to the B from A at port 30206
telnet B 30206
#Successfully connected to B
Now we need to do a sftp pull.
I sent my Server A public keys and the guy says he has placed it in Site C
We don't own the router B but its part of our company network.
I tried
#sftp -oPort=30206 username@Site C
It asks for a password"
Not sure how can we connect to the Site C via router B
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 1: Applying options for *
debug1: /etc/ssh/ssh_config line 4: Deprecated option "rhostsauthentication"
debug1: /etc/ssh/ssh_config line 8: Deprecated option "fallbacktorsh"
debug1: /etc/ssh/ssh_config line 9: Deprecated option "usersh"
debug1: Connecting to emea1-bloomsftp.gslb.db.com [10.142.230.76] port 30206.
debug1: Connection established.
debug1: could not open key file '/etc/ssh/ssh_host_key': No such file or directory
debug1: could not open key file '/etc/ssh/ssh_host_dsa_key': No such file or directory
debug1: could not open key file '/etc/ssh/ssh_host_ecdsa_key': Permission denied
ASKER
@noci
Thanks for the reply.
But actually I just wanted to know the syntax for connecting to a target server via a router
Did a SCP also and same issue...Its not connecting.
doesn't connect to Site C .
Not sure if the command I am trying is correct ?
Thanks for the reply.
But actually I just wanted to know the syntax for connecting to a target server via a router
Did a SCP also and same issue...Its not connecting.
#scp -P 30206 username@Router B:/ .
#sftp -oPort=30206 username@Router B
doesn't connect to Site C .
Not sure if the command I am trying is correct ?
You cannot specify access via a router this way...
And this assumes the regular port 22 has been replaced with 30206 on the target.
You connect to the target system directly C?:
The sftp / scp service needs to be setup on the target system though.
Telnet ports ARE NOT for use by sftp/scp . They are telnet only. If telnet is used as a testing tool if a port exists and does connect, that is OK.
(BTW, telnet is unsecured, and shows password to any network observer on the way between your system and the target system. )
ssh ports can be used for ssh / sftp.
For telnet ports try to use Kermit , zmodem to transfer files.
And this assumes the regular port 22 has been replaced with 30206 on the target.
You connect to the target system directly C?:
$ scp -P 30206 username@targetsystemC:/whateverfile ./
$ sftp -oPort=30206 username@targetsystemC
The sftp / scp service needs to be setup on the target system though.
Telnet ports ARE NOT for use by sftp/scp . They are telnet only. If telnet is used as a testing tool if a port exists and does connect, that is OK.
(BTW, telnet is unsecured, and shows password to any network observer on the way between your system and the target system. )
ssh ports can be used for ssh / sftp.
For telnet ports try to use Kermit , zmodem to transfer files.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Try if SCP does work there.
Another option is to try to use CURL which can ( https://curl.haxx.se ) handle some of the processing.