-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aliases take over serial port names #190
Comments
ConsolePi can handle the alias definition and auto create both the associated udev rule and the ser2net config. Use the I expect the remote launcher is trying to connect to ttyUSB0 because the sshd_config is telling it to. Use /dev/alias-name in the sshd_config. Ideally let ConsolePi do it as described above. To prevent conflict (if you wanted to use it later). |
That's the thing, once an alias is set, users can't connect to the original device-name ttyUSB0. Users or I would have to manually edit sshd_config to reflect new aliases. An enhancement would be if ConsolePi could set its own "internal" alias (cpi0,1,2...) when it detects new cables. Since udev-rule SYMLINK allows for more than one alias, ConsolePi would still allow user-aliases. 3rd-party scripts or configs like mine would still work using the ConsolePis alias cpi0. I think predictability would increase out of the box for FTDI chips. |
I see what's going on. The remote_launcher was designed to facilitate connections from a remote ConsolePi. i.e. ConsolePi-A through mdns, or cloud (gdrive) sync will discover ConsolePi-B and display all of it's connections in it's menu. The adapter detection for all of it (local or remote) uses the aliases if set. Otherwise you would have duplicate entries for the same device in the menu, which obviously wouldn't be desired.
The So this one I don't think is necessary, once you set the alias via one of the options ConsolePi provides, just reference the adapter by that alias. It does however potentially make sense to add /etc/sshd_config as part of the
I also need to sort out how to create a tty on the ConsolePi side so the user doesn't need to provide the Also when this is implemented I won't use sshd_config directly, I'll use |
After looking into it. You can actually launch directly to the default port names when there is an alias. Again, it's still not advisable, but you can. Using When you select a console connection from a remote ConsolePi menu it provides the full command with all flags. So you could either use: One of the functions of remote_launcher is giving you the option to kill a hung session. This can happen if you connect, walk-away and your PC goes to sleep. The picocom session was never terminated, but your SSH session was. So when you try to re-connect to it the port is occupied. remote_launcher will detect that, and ask if you want to kill and reconnect. You could also launch into tmux or byobu (a wrapper for tmux) it runs in a sub-shell, so you can always reconnect and re-attach. Eventually I plan to have the menu auto-launch into byobu/tmux and when you connect to a device have it launch to a new tab. Still has to be |
Closing this, nothing to fix in the local adapter detection logic. Previous post describes the options. Will consider adding ssh match rules to part of rename logic. |
Hi,
I'm using
/etc/ConsolePi/src/remote_launcher.py
in my sshd_config so I can SSH to an IP and open that IPs assigned console-port. As mentioned here.Today we decided to add names to console-ports, but when we try to SSH to an IP we get the following:
Is there anyway to keep the name ttyUSB0? The device still exists on the system.
Or even better for predictability assign multiple aliases?
An idea would would be on first boot or first connect of a console-cable, assign an alias like
cpi0, cpi1, cpi2
to enhance predictability from start. And then users can add an alias of the users choosing.Thanks! ConsolePi is so well made!
Edit:
Just found I can add udev SYMLINK names like so:
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="AB81ADGV", SYMLINK+="cpi0 switch-134", GOTO="END"
And both cpi0 and switch-134 would be created. I have to manually create a ser2net-config.
The text was updated successfully, but these errors were encountered: