Solved

scp/ftp to DMZ linux server

Posted on 2011-02-25
14
953 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 10

Assisted Solution

by:lanboyo
lanboyo earned 100 total points
Comment Utility
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
Comment Utility
show us the ssh command you use to connect to the dmz box.
0
 

Author Comment

by:mnis2008
Comment Utility
The command I used was

scp krb5cc_100004 gsteve@DMZSERVER:/tmp

0
 

Author Comment

by:mnis2008
Comment Utility
This is the error

ssh: connect to host DMZSERVER port 22: Connection timed out
lost connection
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 1

Assisted Solution

by:hdaz
hdaz earned 300 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Glad you have the solution, tshark - wireshark is your friend for extra complex problems..
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
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…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now