简体   繁体   English

从Mac OS X命令行关联到加密的ssid

[英]associating to an encrypted ssid from mac os x command line

I have a bunch of macbook pro and air laptops which are being controlled through SSH. 我有一堆通过SSH控制的macbook pro和air笔记本电脑。 At this point I need to make them associate to an encrypted SSID. 此时,我需要使它们与加密的SSID关联。 The command that I use is: sudo networksetup -setairportnetwork en0 test-ssid 12345678 where test-ssid is the ssid that we connect to and 12345678 is the password. 我使用的命令是: sudo networksetup -setairportnetwork en0 test-ssid 12345678其中test-ssid是我们连接到的ssid,而12345678是密码。

When I issue this command through SSH it halts and a pop-up window appears on the laptop GUI where it says: "networksetup wants to access key "test-ssid" in your keychain with the options "Always Allow", "Deny" and "Allow" 当我通过SSH发出此命令时,它暂停并在笔记本电脑GUI上显示一个弹出窗口,其中显示:“ networksetup希望使用选项“始终允许”,“拒绝”和“访问”来访问钥匙串中的密钥“ test-ssid”。 “允许”

Is there a way to make this window not appear and have the laptop simply connect to the ssid? 有没有一种方法可以使该窗口不出现,并使笔记本电脑仅连接到ssid? I don't have a regular access to the laptop GUI and the SSID names constantly change so I can't really manually hit accept every time I need to connect a bunch of laptops. 我没有对笔记本电脑GUI的常规访问权限,并且SSID名称不断变化,因此每次需要连接一堆笔记本电脑时,我都无法真正手动点击接受。

Thanks in advance! 提前致谢!

This is basically an issue with the older OS X versions. 这基本上是旧版OS X的问题。 Works fine on Yosemite which I was hesitant to upgrade to. 我不愿意升级到优胜美地,效果很好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM