Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

everyone. I have a shell account but the admin has restricted ssh access to the server. The server is listening on 0.0.0.0:22 but the firewall blocks any incoming attempts to this port. He says he is doing maintenance but I don't believe him and I need to backup my stuff with ssh. My question is that: Is it possible to do this:

Me (Wan IP) <-> Hosting Server (tcp/8080) redirects to Hosting Server (tcp/22)

I don't want to involve my own linux machine in this and I can only make use of ssh..

Thanks!!

share|improve this question
2  
Why don't you believe that the admin is doing maintenance? –  Zypher May 18 '10 at 17:03

3 Answers 3

It's easier to change the Port directive in /etc/ssh/sshd_config to 8080 rather than to redirect from 8080 to 22 using SNAT via iptables.

share|improve this answer
    
Well but I don't have root privileges. This is the issue :( –  Salina Odelva Apr 4 '10 at 11:52

You would need to run something on the hosting server that does the redirect. If you can run ssh on the hosting server, you might be able to do it as

ssh -L 8080:localhost:22 -N localhost
share|improve this answer

If ssh has been disabled on the server I don't think port redirection will help. You can always ssh -p 8080 but that doesn't mean that the ssh daemon will log you in.

If you do have access to the server that you want to put files, how are you logging on if not via ssh? Can you get to a terminal? If so I recommend using nc. It's probably installed and pretty darn fast in my experience.

Run this on the machine you want to copy to:

nc -l 1234 > myfiles.tar.gz

This will redirect all input on port 1234 to the specified file.

And from the computer you are copying from:

nc <server name or ip> 1234 < myfiles.tar.gz

If you have access, there is a way.

Also, run nmap and see if ftp or file sharing ports are open.

share|improve this answer
    
nifty trick with nc :) –  warren May 18 '10 at 17:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.