?
Solved

scp/ftp to DMZ linux server

Posted on 2011-02-25
14
Medium Priority
?
1,051 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 10

Assisted Solution

by:lanboyo
lanboyo earned 400 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 1200 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 1200 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 400 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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,…
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…
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.:
Suggested Courses
Course of the Month8 days, 14 hours left to enroll

764 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