Bcvi allows running a full-screen vi editor session over a limited bandwidth or high-latency connection, such as a serial console or SSH connection with significant lag. It achieves this by using a "back-channel" to send screen updates efficiently. Instead of redrawing the entire screen for every change, bcvi only transmits the differences, leading to a significantly more responsive experience. This makes editing files remotely over constrained connections practical, providing a near-native vi experience even with limited bandwidth. The back-channel can be another SSH connection or even a separate serial port, providing flexibility in setup.
VS Code's remote SSH functionality can lead to unexpected and frustrating behavior due to its complex key management. The editor automatically adds keys to its internal SSH agent, potentially including keys you didn't intend to use for a particular connection. This often results in authentication failures, especially when using multiple keys for different servers. Even manually removing keys from the agent within VS Code doesn't reliably solve the issue because the editor might re-add them. The blog post recommends disabling VS Code's agent and using the system SSH agent instead for more predictable and manageable SSH connections.
HN users generally agree that VS Code's remote SSH behavior is confusing and frustrating. Several commenters point out that the "agent forwarding" option doesn't work as expected, leading to issues with key-based authentication. Some suggest the core problem stems from VS Code's reliance on its own SSH implementation instead of leveraging the system's SSH, causing conflicts and unexpected behavior. Workarounds like using the Remote - SSH: Kill VS Code Server on Host...
command or configuring VS Code to use the system SSH are mentioned, along with the observation that the VS Code team seems aware of the issues and is working on improvements. A few commenters share similar struggles with other IDEs and remote development tools, suggesting this isn't unique to VS Code.
Summary of Comments ( 13 )
https://news.ycombinator.com/item?id=43283814
Hacker News users discuss the cleverness and potential uses of
bcvi
, particularly for embedded systems debugging. Some express admiration for the ingenuity of using the back channel for editing, highlighting its usefulness when other methods are unavailable. Others question the practicality due to potential slowness and limitations, suggesting alternatives likeed
. A few commenters reminisce about using similar techniques in the past, emphasizing the historical context of this approach within resource-constrained environments. Some discuss potential security implications, pointing out that the back channel could be vulnerable to manipulation. Overall, the comments appreciate the technical ingenuity while acknowledging the niche appeal ofbcvi
.The Hacker News post "Bcvi – run vi over a 'back-channel' (2010)" has several comments discussing the utility and implications of the
bcvi
tool.One commenter highlights the potential security risks of using such a tool, especially if the back channel isn't adequately secured. They express concern about inadvertently exposing sensitive information or granting unintended access to a system. This concern is echoed by another user who points out the inherent danger of trusting arbitrary escape sequences. They suggest that, while interesting, the approach presents a significant attack surface.
Another commenter questions the practical applications of
bcvi
, wondering in what scenarios it would be genuinely useful. They acknowledge the cleverness of the concept but struggle to envision situations where it would be preferable to established methods of remote file editing. This skepticism is shared by a separate commenter who points out the existing availability of tools likesshfs
which offer a more robust and secure way to edit remote files.Several commenters delve into the technical aspects of
bcvi
, discussing its implementation and potential limitations. One points out the challenge of handling interactive commands and the need for careful consideration of terminal emulation. Another user mentions the project's age and expresses curiosity about its current status and whether it's still actively maintained.A commenter recalls using a similar technique in the past, involving
screen
andvi
, for editing files over a serial console. They describe the setup and the advantages it offered in their specific use case. This anecdote provides a practical example of a scenario where a back-channel editing approach could be beneficial.One commenter humorously suggests using netcat as a more straightforward alternative for editing remote files over a simple connection. While likely intended as a tongue-in-cheek suggestion, it highlights the potential simplicity of achieving similar functionality with readily available tools.
Finally, a few comments express general appreciation for the cleverness and ingenuity of the
bcvi
concept, even if its practicality is debated. They acknowledge the value of exploring unconventional approaches to problem-solving.