Solved

scp/ftp to DMZ linux server

Posted on 2011-02-25
14
1,006 Views
Last Modified: 2012-05-11
Hello Experts

I have a linux server in DMZ running RHEL4, How do I copy a tar file to this server. I can ssh to the server but I am not able to FTP. So what could be the fix

Steve
0
Comment
Question by:mnis2008
  • 4
  • 4
  • 2
  • +4
14 Comments
 
LVL 9

Expert Comment

by:jeremycrussell
ID: 34980953
Use sftp or scp.

scp file.tar <user>@<linux-in-dmz-server>:/path/to/put/file.


The /path/to/put/file part will require the <user> to have write permissions.

So, more than likely you would want to specify the <user>'s home directory (i.e. /home/<user>) or perhaps /tmp


0
 
LVL 12

Expert Comment

by:upanwar
ID: 34981988
If you are accessing your box with Windows then use winscp to copy your file or if you using linux to access your box then use scp/sftp to copy your file.
0
 

Author Comment

by:mnis2008
ID: 34983029
I tried to scp from a server in the local network to a server in DMZ

This is the error I got

root@csc06add1# scp krb5cc_100004 gsteve@DMZSERVER:/tmp
ssh: connect to host lpv042 port 22: Connection timed out
lost connection
0
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
LVL 10

Assisted Solution

by:lanboyo
lanboyo earned 100 total points
ID: 34984212
Do you use an alternate port to scp to the other server?

That would be scp -P krb5cc_100004 gsteve@DMZSERVER:/tmp

Can you definitely ssh into the server from that box using the same hostname?
0
 
LVL 7

Expert Comment

by:diepes
ID: 34987250
show us the ssh command you use to connect to the dmz box.
0
 

Author Comment

by:mnis2008
ID: 34997766
The command I used was

scp krb5cc_100004 gsteve@DMZSERVER:/tmp

0
 

Author Comment

by:mnis2008
ID: 34997771
This is the error

ssh: connect to host DMZSERVER port 22: Connection timed out
lost connection
0
 
LVL 1

Assisted Solution

by:hdaz
hdaz earned 300 total points
ID: 34998038
Show the output from

scp -vv file.tar <user>@<linux-in-dmz-server>:/path/to/put/file.

this will give someone the change to see what the problem might be...

0
 
LVL 1

Accepted Solution

by:
hdaz earned 300 total points
ID: 34998121
Point two...

are you using @DMZSERVER the internal ip address or your external ip address ??

hopefully the above is the external IP and that your server your are connecting from to do the scp has access to the web via port 22 or whatever port you are using?

If its the internal address, what sort of routing NATTING or vlan(s) are in place?
0
 
LVL 2

Assisted Solution

by:maxalarie
maxalarie earned 100 total points
ID: 35003962
Try a telnet on port 22,  if you cannot connect, that means port 22 is closed.

If its closed, run nmap on your machine:


 nmap -sS IPAdress
0
 
LVL 1

Expert Comment

by:hdaz
ID: 35005458
Maxalarie,

Good suggestion but it does not have to mean it is closed it might just not be getting the return reply...

mis-configured routing on a switch would look pretty closed to....
0
 
LVL 7

Expert Comment

by:diepes
ID: 35007925
mnis2008: show us the ssh command that works.

scp uses ssh, you mentioned that ssh works, comparing the working ssh and the broken scp command-lines should indicate the problem.
0
 

Author Closing Comment

by:mnis2008
ID: 35008604
With all the solutions I was able to figure out what was causing the problem, I have installed winscp and it worked
0
 
LVL 1

Expert Comment

by:hdaz
ID: 35009699
Glad you have the solution, tshark - wireshark is your friend for extra complex problems..
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
error log using ftp 7 75
Linux FTP Error 5 44
Fuzzy search functionality DB2 UDB 3 30
SSSD - Automatic kerberos ticket initialization 1 11
I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question