varnish 3 telnet 认证

2023-01-31 01:01:57 telnet varnish 认证

varnish 3 telent 连接认证

telnet 连接varnish服务器,管理varnish,纠结了很久。一直报错~~

官网方式

https://www.varnish-cache.org/docs/3.0/reference/varnish-cli.html


critter phk> cat > _
ixslvvxrgkjptxmcgnnsdxsvdmvfympg
foo
ixslvvxrgkjptxmcgnnsdxsvdmvfympg
^D
critter phk> hexdump -C _
00000000  69 78 73 6c 76 76 78 72  67 6b 6a 70 74 78 6d 63  |ixslvvxrgkjptxmc|
00000010  67 6e 6e 73 64 78 73 76  64 6d 76 66 79 6d 70 67  |gnnsdxsvdmvfympg|
00000020  0a 66 6f 6f 0a 69 78 73  6c 76 76 78 72 67 6b 6a  |.foo.ixslvvxrgkj|
00000030  70 74 78 6d 63 67 6e 6e  73 64 78 73 76 64 6d 76  |ptxmcgnnsdxsvdmv|
00000040  66 79 6d 70 67 0a                                 |fympg.|
00000046
critter phk> sha256 _
SHA256 (_) = 455ce847f0073c7ab3b1465f74507b75d3Dc064c1e7de3b71e00de9092fdc89a
critter phk> openssl dgst -sha256 < _
455ce847f0073c7ab3b1465f74507b75d3dc064c1e7de3b71e00de9092fdc89a

[root@app01 ~]# telnet 192.168.0.200 3500
Trying 192.168.0.200...
Connected to name01.dev.ihefa.com (192.168.0.200).
Escape character is '^]'.
107 59     
fihavxljosnjdGCinozwrkcjgnapsgjx

Authentication required.

开一个新的窗口

[root@app01 ~]# cat >_
fihavxljosnjdgcinozwrkcjgnapsgjx
1ecbd809-c203-4052-9271-f29d3e5274dc
fihavxljosnjdgcinozwrkcjgnapsgjx
[root@app01 ~]# hexdump -C _
00000000  66 69 68 61 76 78 6c 6a  6f 73 6e 6a 64 67 63 69  |fihavxljosnjdgci|
00000010  6e 6f 7a 77 72 6b 63 6a  67 6e 61 70 73 67 6a 78  |nozwrkcjgnapsgjx|
00000020  0a 31 65 63 62 64 38 30  39 2d 63 32 30 33 2d 34  |.1ecbd809-c203-4|
00000030  30 35 32 2d 39 32 37 31  2d 66 32 39 64 33 65 35  |052-9271-f29d3e5|
00000040  32 37 34 64 63 0a 66 69  68 61 76 78 6c 6a 6f 73  |274dc.fihavxljos|
00000050  6e 6a 64 67 63 69 6e 6f  7a 77 72 6b 63 6a 67 6e  |njdgcinozwrkcjgn|
00000060  61 70 73 67 6a 78 0a                              |apsgjx.|
00000067
[root@app01 ~]# sha256
sha256hMac  sha256sum  
[root@app01 ~]# sha256
sha256hmac  sha256sum  
[root@app01 ~]# sha256sum _
88fe23638e95de6b9f9f70abcc62cb44a0c39198b9065bce9d124bd18a0a561f  _
[root@app01 ~]#

回到第一个窗口

[root@app01 ~]# telnet 192.168.0.200 3500
Trying 192.168.0.200...
Connected to name01.dev.ihefa.com (192.168.0.200).
Escape character is '^]'.
107 59     
fihavxljosnjdgcinozwrkcjgnapsgjx

Authentication required.

auth 88fe23638e95de6b9f9f70abcc62cb44a0c39198b9065bce9d124bd18a0a561f
200 208    
-----------------------------
Varnish Cache CLI 1.0
-----------------------------
linux,2.6.32-220.el6.x86_64,x86_64,-sfile,-smalloc,-hcritbit

Type 'help' for command list.
Type 'quit' to close CLI session.

 

登录成功~~

这样的方式很麻烦,不知道有木有更好的方法。求真相~

相关文章