scp/ftp to DMZ linux server

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
mnis2008Asked:
Who is Participating?
 
hdazConnect With a Mentor Commented:
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
 
jeremycrussellCommented:
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
 
upanwarCommented:
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
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
mnis2008Author Commented:
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
 
lanboyoConnect With a Mentor Commented:
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
 
diepesCommented:
show us the ssh command you use to connect to the dmz box.
0
 
mnis2008Author Commented:
The command I used was

scp krb5cc_100004 gsteve@DMZSERVER:/tmp

0
 
mnis2008Author Commented:
This is the error

ssh: connect to host DMZSERVER port 22: Connection timed out
lost connection
0
 
hdazConnect With a Mentor Commented:
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
 
maxalarieConnect With a Mentor Commented:
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
 
hdazCommented:
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
 
diepesCommented:
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
 
mnis2008Author Commented:
With all the solutions I was able to figure out what was causing the problem, I have installed winscp and it worked
0
 
hdazCommented:
Glad you have the solution, tshark - wireshark is your friend for extra complex problems..
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.