qca / boardfarm

Main repo moved to:
https://github.com/mattsm/boardfarm/
BSD 3-Clause Clear License
71 stars 54 forks source link

password not configurable for SshWanDetect? #77

Closed yi-liang closed 7 years ago

yi-liang commented 8 years ago

seems in /tests/ssh_forward_port.py, the password(for WAN ssh connect to DUT) was hard coded as "password"?

sp = lib.common.spawn_ssh_pexpect(ipaddr, "root",
               "password", prompt="root@OpenWrt", port=port, via=wan)
mbanders commented 8 years ago

You can change the word "password" to anything you want. You have the source code :)

Here's an outline of how one could create a new configuration parameter:

sp = lib.common.spawn_ssh_pexpect(ipaddr, "root",
               self.config.default_vm_password, prompt="root@OpenWrt", port=port, via=wan)

I think that might work, but someone should give it a try - and submit a code change for review. I could see that being useful.

mattsm commented 7 years ago

There are also dynamic devices now and you can add as many as you want to the boardfarm config, the password is saved so you could add your own new device you want to ssh (or re-use one that is there) and the password is moved from the config file to the device class. Look at commit aacff18abbd348a3987a1ec08360a202b16e9195 for more details.