我正在尝试使用wget和curl从unix框中复制.xml
文件,但我不知道如何通过隧道,因为路由器根据已解决的问题与我的网关建立连接端口。
[GW IP(B)]< - > [路由器IP(A):10022]< - >网络
我可以使用scp:
完成并复制文件 scp -P 10022 user@IP(A):/var/www/file.xml .
但是我需要使用wget,curl或除了scp以外的任何其他方法,但是使用wget和curl我没有得到结果
curl -o file.xml -u user:passwd IP(A):10022/file.xml --verbose
Closing connection #0
* Failure when receiving data from the peer
curl: (56) Failure when receiving data from the peer
wget --http-user=user --http-password=passwd IP(A):10022/file.xml
Saving to: `file.xml'
[ <=> ] 32 --.-K/s in 0s
2012-02-02 11:05:49 (2.19 MB/s) - Read error at byte 32 (Connection reset by peer).Retrying.
--2012-02-02 11:05:50-- (try: 2) http://IP(A)10022/file.xml
Connecting to IP(A):10022... connected.
Proxy request sent, awaiting response... 200 No headers, assuming HTTP/0.9
The file is already fully retrieved; nothing to do.
在这两种情况下,我都得到了ssh横幅信息:
SSH-2.0-OpenSSH_5.1p1 Debian-4
网关中的Apache2配置如下:
httpd.conf(在Directory / var / www中)
Options Indexes FollowSymLinks Multiviews
AllowOverride All
Order allow,deny
allow from all
AuthType Basic
AuthName "Restricted"
AuthUserFile /etc/apache2/.htpasswd
的.htaccess
AuthType Basic
AuthName "Password Required"
AuthUserFile /etc/apache2/.htpasswd
Require valid-user
Order deny,allow