2015-06-03 46 views
0

我使用凭证为Ubuntu设置了基本认证的squid代理,并使用浏览器使用用户名和密码正常工作进行了测试。ubuntu的squid代理基本认证

现在我想通过命令行连接它。使用Mac系统命令lineand试图连接到远程终端的SSH端口建立

CONNECT 192.111.222.33:22 HTTP/1.0 Proxy-Authorization: Basic <usernamepasswordencodedinbase64format> and press enter twice 

收到此错误

HTTP/1.0 400错误的请求 服务器:鱿鱼/ 3.1.19 MIME的版本: 1.0 日期:星期三,2015年6月3日13时38分35秒GMT 的Content-Type:text/html的 的Content-Length:3740 X-鱿鱼错误:ERR_INVALID_REQ 0 各不相同:接受语言 内容语言:zh X-Cache:来自localhost的MISS X-缓存查找:3128 通过:从localhost无1.0本地主机(鱿鱼/ 3.1.19)

Connection: close 

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 
<html><head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
<title>ERROR: The requested URL could not be retrieved</title> 

<ul> 
<li id="missing-method"><p>Missing or unknown request method.</p></li> 
<li id="missing-url"><p>Missing URL.</p></li> 
<li id="missing-protocol"><p>Missing HTTP Identifier (HTTP/1.0).</p></li> 
<li><p>Request is too large.</p></li> 
<li><p>Content-Length missing for POST or PUT requests.</p></li> 
<li><p>Illegal character in hostname; underscores are not allowed.</p></li> 
<li><p>HTTP/1.1 <q>Expect:</q> feature is being asked from an HTTP/1.0 software.</p></li> 
</ul> 

请帮助

回答

0

我只需要按回车键,然后键入该代理授权:基本而不是同一行,这是因为错误信息而造成的错误。所以它会像

CONNECT 192.111.222.33:22 HTTP/1.0 press enter 
Proxy-Authorization: Basic <usernamepasswordencodedinbase64format> and press enter