Solved

scp/ftp to DMZ linux server

Posted on 2011-02-25
14
1,029 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

717 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