Solved

scp/ftp to DMZ linux server

Posted on 2011-02-25
14
985 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
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 how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

831 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