Linux系统Wpa_supplicant用法小结
Wpa_supplicant是linux系统下一个非常强大的无线网卡管理程序。google搜索到的它似乎不支持WPA2和AES,其实不然,参考它的文档可以发现,WPA2只是RSN的别名,而AES也是CCMP的一部分,所以它们的支持完全是没有问题的。
它的文档看起来非常复杂,其实配置非常简单,下面先给出我的wpa_supplication.conf
- ctrl_interface=/var/run/wpa_supplicant
- ctrl_interface_group=wheel
- update_config=1
- network={
- ssid="xxxx"
- scan_ssid=1
- psk=xxxxxxxxx37bca5cf24a345f514d319211822f568bba28f8f0b74c894e7644
- proto=RSN
- key_mgmt=WPA-PSK
- pairwise=CCMP
- auth_alg=OPEN
- }
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
update_config=1network={ssid="xxxx"scan_ssid=1psk=xxxxxxxxx37bca5cf24a345f514d319211822f568bba28f8f0b74c894e7644proto=RSNkey_mgmt=WPA-PSKpairwise=CCMPauth_alg=OPEN
}
解释一下上面的比较容易困惑的地方:
签名三句应该是个模板,没仔细研究过。
network=开始是无线接入点的具体配置,一般的无线接入点可以用wpa_passphrase来自动生成,语法是
- yj@YJ_N ~ $ wpa_passphrase
- usage: wpa_passphrase <ssid> [passphrase]
- If passphrase is left out, it will be read from stdin
- 接下来看个实例:
- yj@YJ_N ~ $ wpa_passphrase TPLINK 12345678
- network={
- ssid="TPLINK"
- #psk="12345678"
- psk=992194d7a6158009bfa25773108291642f28a0c32a31ab2556a15dee97ef0dbb
- }
- 这里表示名为TPLINK的接入点,密码是12345678,输出就是该接入点在wpa_supplicant.conf里面的配置内容,可以直接用下面的命令自动写入
- yj@YJ_N ~ $ wpa_passphrase TPLINK 12345678 |sudo tee -a /etc/wpa_supplicant/wpa_supplicant.conf
yj@YJ_N ~ $ wpa_passphrase
usage: wpa_passphrase <ssid> [passphrase]If passphrase is left out, it will be read from stdin接下来看个实例:yj@YJ_N ~ $ wpa_passphrase TPLINK 12345678
network={ssid="TPLINK"#psk="12345678"psk=992194d7a6158009bfa25773108291642f28a0c32a31ab2556a15dee97ef0dbb
}
这里表示名为TPLINK的接入点,密码是12345678,输出就是该接入点在wpa_supplicant.conf里面的配置内容,可以直接用下面的命令自动写入yj@YJ_N ~ $ wpa_passphrase TPLINK 12345678 |sudo tee -a /etc/wpa_supplicant/wpa_supplicant.conf
继续解释最开始的例子,network=后面的内容
ssid :接入点名称,这个没什么好说的
scan_ssid=1 :这个很容易错过,如果你的无线接入点是隐藏的,那么这个就是必须的,亲身经历,折腾了好久才搞定,记之备忘。
psk=xx :是加密后的密码,用wpa_passphrase自动生成的
proto=RSN WPA2就选这个,抄一下官方配置文件例子里面的:
- # proto: list of accepted protocols ---支持的协议列表
- # WPA = WPA/IEEE 802.11i/D3.0
- # RSN = WPA2/IEEE 802.11i (also WPA2 can be used as an alias for RSN) ---也能使用WPA2,它只是RSN的一个别名而已
- # If not set, this defaults to: WPA RSN ---如果不设置,默认就是WPA RSN,即全部支持
# proto: list of accepted protocols ---支持的协议列表
# WPA = WPA/IEEE 802.11i/D3.0
# RSN = WPA2/IEEE 802.11i (also WPA2 can be used as an alias for RSN) ---也能使用WPA2,它只是RSN的一个别名而已
# If not set, this defaults to: WPA RSN ---如果不设置,默认就是WPA RSN,即全部支持
key_mgmt= 认证密钥管理协议,还是抄:
- # key_mgmt: list of accepted authenticated key management protocols ---支持的协议列表
- # WPA-PSK = WPA pre-shared key (this requires 'psk' field) ---一般都是这个,这就包括了WPA、WPA2开始的那些方式
- # WPA-EAP = WPA using EAP authentication ---这个就是WEP开头的,猜的,求验证
- # IEEE8021X = IEEE 802.1X using EAP authentication and (optionally) dynamically
- # generated WEP keys
- # NONE = WPA is not used; plaintext or static WEP could be used ---这个是开放的,没密码,联通、电信之类的就这个
- # WPA-PSK-SHA256 = Like WPA-PSK but using stronger SHA256-based algorithms
- # WPA-EAP-SHA256 = Like WPA-EAP but using stronger SHA256-based algorithms
- # If not set, this defaults to: WPA-PSK WPA-EAP ---如果未设置,默认支持WAP、WEP开头那些
# key_mgmt: list of accepted authenticated key management protocols ---支持的协议列表
# WPA-PSK = WPA pre-shared key (this requires 'psk' field) ---一般都是这个,这就包括了WPA、WPA2开始的那些方式
# WPA-EAP = WPA using EAP authentication ---这个就是WEP开头的,猜的,求验证
# IEEE8021X = IEEE 802.1X using EAP authentication and (optionally) dynamically
# generated WEP keys
# NONE = WPA is not used; plaintext or static WEP could be used ---这个是开放的,没密码,联通、电信之类的就这个
# WPA-PSK-SHA256 = Like WPA-PSK but using stronger SHA256-based algorithms
# WPA-EAP-SHA256 = Like WPA-EAP but using stronger SHA256-based algorithms
# If not set, this defaults to: WPA-PSK WPA-EAP ---如果未设置,默认支持WAP、WEP开头那些
pairwise= 这个就是加密方式,继续抄
- # pairwise: list of accepted pairwise (unicast) ciphers for WPA ---WPA可用的加密方式列表
- # CCMP = AES in Counter mode with CBC-MAC [RFC 3610, IEEE 802.11i/D7.0] ---看到没,这个就是AES,换了马甲而已
- # TKIP = Temporal Key Integrity Protocol [IEEE 802.11i/D7.0] ---TKIP 这个倒是没变
- # NONE = Use only Group Keys (deprecated, should not be included if APs support
- # pairwise keys) ---这个估计很少用
- # If not set, this defaults to: CCMP TKIP ---不设置的话是CCMP TKIP,看似正确,其实有些路由器无法自动识别,只能二选一,很坑爹。
# pairwise: list of accepted pairwise (unicast) ciphers for WPA ---WPA可用的加密方式列表
# CCMP = AES in Counter mode with CBC-MAC [RFC 3610, IEEE 802.11i/D7.0] ---看到没,这个就是AES,换了马甲而已
# TKIP = Temporal Key Integrity Protocol [IEEE 802.11i/D7.0] ---TKIP 这个倒是没变
# NONE = Use only Group Keys (deprecated, should not be included if APs support
# pairwise keys) ---这个估计很少用
# If not set, this defaults to: CCMP TKIP ---不设置的话是CCMP TKIP,看似正确,其实有些路由器无法自动识别,只能二选一,很坑爹。
好了,其他的不多说了,有兴趣看英文原文吧:
wpa_supplicant官方配置文件(英文)
Linux系统Wpa_supplicant用法小结相关推荐
- Linux系统Wpa_supplicant用法小结(转)
Wpa_supplicant是linux系统下一个非常强大的无线网卡管理程序.google搜索到的它似乎不支持WPA2和AES,其实不然,参考它的文档可以发现,WPA2只是RSN的别名,而AES也是C ...
- linux系统grep用法,Linux系统中怎么使用grep命令?
在维护Linux系统时,我们常常需要在文本中搜索需要的东西,如果人为手动的去找那显然效率低下,那么如何才能快速找到所需要的文本呢?下面小编就以CentOS6.4系统为例为大家演示如何进行文本查找. 一 ...
- Linux系统时间同步方法小结
原文装载自:https://www.cnblogs.com/ibnode/p/3573302.html 在Windwos中,系统时间的设置很简单,界面操作,通俗易懂,而且设置后,重启,关机都没关系.系 ...
- Linux系统的学习小结
这两天在准备计算机三级--嵌入式的过程中,接触到了Linux系统,因此在这里把自己学到的东西总结一下. 一.Linux内核的结构与组成 Linux是一种自由软件,也是开源软件,它是一款类Unix系统. ...
- linux 系统kill用法
Linux下Kill函数用法 (2014-06-24 18:13:17) 转载▼ 标签: linux kill函数 分类: Linux-ALL Linux下Kill函数用法[ KILL ]功能描述: ...
- linux系统基础优化小结
不用root, 添加普通用户,通过sudo授权管理 更改默认的远程ssh服务端口及禁止root用户远程登陆 定时自动更新服务器时间 ntpdate 配置yum更新源,从国内更新源下载安装软件,如啊里云 ...
- linux内核优化策略,linux系统调优小结
关于安全系统的调优: 1.关闭selinux安全策略 sed -i s#SELINUX=enforcing#SELINUX=disabled#g /etc/sysconfig/selinux for ...
- Linux系统正则表达式用法笔记
正则表达式:能用某种模式去匹配一类字符串的公式,它是由一串字符和元字符组成的字符串. 元字符就是阐述字符表达式的内容.转换和描述各种操作信息的字符. 常见的一些基础的正则表达式 1.".&q ...
- linux系统grep用法,linux中grep的用法
1.grep [内容] /data/boy 只显示该文件中的内容,其他不显. grep一般常用参数: - i :匹配时忽略大小写 - n :匹配的内容开头显示行号 - v ...
最新文章
- 《算法竞赛中的初等数论》(四)正文 0x40反演(ACM / OI / MO)(十五万字符数论书)
- mysql gt resource_讲解MySQL中lt;=gt;操作符的用法
- Codeforces1080F. Katya and Segments Sets
- java面试题三_最全的java面试题目三
- vim中括号自动补全
- 2018-3-10 unset 变量 ab测试
- 1分钟读懂人口普查大数据——第七次人口普查数据可视化BI分析
- window热敏打印机驱动安装
- matlab实验感悟,2019年matlab实验心得体会学习matlab的心得体会
- Windows Embedded Standard 7 快速入门指南 2 of 4
- 最大公因数、最小公倍数求法(C++)
- IS-IS 路由选择协议入门
- html页面ie不显示图片,IE浏览器网页不显示图片如何解决?解决方法介绍
- Gradle's dependency cache may be corrupt (this sometimes occurs after a net错误解决
- 你不逼自己一把 你怎么知道自己有多优秀
- 【web渗透思路】敏感信息泄露(网站+用户+服务器)
- 如何运营批量推特账户
- 计算机安全原理与实践第三版答案,计算机安全: 原理与实践 : 第3版
- 2018数学建模国赛B题-个人总结(未完)
- PCL 基于ISS与FPFH提取特征点