Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .clang-tidy

This file was deleted.

32 changes: 29 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ add_library(vtcore
src/core/error_handler.cc src/core/error_handler.hh
src/core/crash_report.cc src/core/crash_report.hh
src/network/remote_link.cc src/network/remote_link.hh
src/network/reverse_ssh_service.cc src/network/reverse_ssh_service.hh
src/core/debug.cc src/core/debug.hh
src/core/generic_char.cc src/core/generic_char.hh
src/core/logger.cc src/core/logger.hh
Expand Down Expand Up @@ -551,7 +552,9 @@ target_link_libraries(vt_print vtcore)
add_executable(vt_cdu cdu/cdu_main.cc main/hardware/cdu_att.cc)
target_link_libraries(vt_cdu vtcore)


# Reverse SSH daemon
add_executable(reverse_ssh_daemon src/network/reverse_ssh_daemon.cc)
target_link_libraries(reverse_ssh_daemon vtcore)

# Test executable to verify Catch2 integration
if(BUILD_TESTING)
Expand Down Expand Up @@ -585,7 +588,7 @@ install(CODE "file(MAKE_DIRECTORY \${CMAKE_INSTALL_PREFIX}/viewtouch/dat/crashre
install(CODE "file(MAKE_DIRECTORY \${CMAKE_INSTALL_PREFIX}/viewtouch/bin/vtcommands)")
install(CODE "file(MAKE_DIRECTORY \${CMAKE_INSTALL_PREFIX}/share/viewtouch/fonts)")

install(TARGETS vtpos vt_cdu vt_print vt_term vt_main
install(TARGETS vtpos vt_cdu vt_print vt_term vt_main reverse_ssh_daemon
RUNTIME DESTINATION viewtouch/bin
LIBRARY DESTINATION viewtouch/lib
ARCHIVE DESTINATION viewtouch/lib/static)
Expand Down Expand Up @@ -623,7 +626,30 @@ else()
endif()
install(PROGRAMS scripts/tools/vtcommands.pl DESTINATION viewtouch/bin/vtcommands)


# Install reverse SSH daemon service, configuration, and management scripts
# Skip systemd service installation in CI environments (requires root permissions)
if(NOT DEFINED ENV{CI})
install(PROGRAMS scripts/system/reverse-ssh-daemon.service DESTINATION /etc/systemd/system/)
message(STATUS "Installing reverse SSH daemon systemd service to /etc/systemd/system/")
else()
message(STATUS "Skipping systemd service installation (CI environment detected)")
endif()
install(PROGRAMS scripts/tools/vt_reverse_ssh DESTINATION viewtouch/bin/)
install(PROGRAMS scripts/tools/vt_ssh_security DESTINATION viewtouch/bin/)
install(PROGRAMS scripts/tools/vt_reverse_ssh_setup DESTINATION viewtouch/bin/)

# Install reverse SSH configuration file
# Skip /etc/viewtouch/ installation in CI environments (requires root permissions)
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/config/reverse_ssh_daemon.conf")
if(NOT DEFINED ENV{CI})
install(FILES config/reverse_ssh_daemon.conf DESTINATION /etc/viewtouch/ RENAME reverse_ssh.conf)
message(STATUS "Installing reverse SSH configuration file to /etc/viewtouch/reverse_ssh.conf")
else()
message(STATUS "Skipping /etc/viewtouch/ configuration file installation (CI environment detected)")
endif()
else()
message(WARNING "Reverse SSH configuration file not found: config/reverse_ssh_daemon.conf")
endif()

#install(CODE "MESSAGE(\"Sample install message.\")")

Expand Down
1 change: 0 additions & 1 deletion Testing/Temporary/CTestCostData.txt

This file was deleted.

26 changes: 26 additions & 0 deletions config/reverse_ssh_daemon.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# ViewTouch Reverse SSH Daemon Configuration
# Copy this file to /etc/viewtouch/reverse_ssh.conf and customize the settings

# Management server details
management_server=management.viewtouch.com
management_port=22
remote_user=viewtouch

# Tunnel configuration
# Local port to expose (typically SSH port 22)
local_port=22
# Remote port on management server (0 = auto-assign)
remote_port=0

# SSH authentication
ssh_key_path=/usr/viewtouch/ssh/reverse_ssh_key

# Connection settings
reconnect_interval=30
health_check_interval=60
max_retries=10

# Daemon settings
log_file=/var/log/viewtouch/reverse_ssh_daemon.log
pid_file=/var/run/viewtouch/reverse_ssh_daemon.pid
daemonize=true
Loading