@@ -419,6 +419,7 @@ add_library(vtcore
419419 src/core/error_handler.cc src/core/error_handler.hh
420420 src/core/crash_report.cc src/core/crash_report.hh
421421 src/network/remote_link.cc src/network/remote_link.hh
422+ src/network/reverse_ssh_service.cc src/network/reverse_ssh_service.hh
422423 src/core/debug.cc src/core/debug.hh
423424 src/core/generic_char.cc src/core/generic_char.hh
424425 src/core/logger.cc src/core/logger.hh
@@ -551,7 +552,9 @@ target_link_libraries(vt_print vtcore)
551552add_executable (vt_cdu cdu/cdu_main.cc main/hardware/cdu_att.cc )
552553target_link_libraries (vt_cdu vtcore )
553554
554-
555+ # Reverse SSH daemon
556+ add_executable (reverse_ssh_daemon src/network/reverse_ssh_daemon.cc )
557+ target_link_libraries (reverse_ssh_daemon vtcore )
555558
556559# Test executable to verify Catch2 integration
557560if (BUILD_TESTING)
@@ -585,7 +588,7 @@ install(CODE "file(MAKE_DIRECTORY \${CMAKE_INSTALL_PREFIX}/viewtouch/dat/crashre
585588install (CODE "file(MAKE_DIRECTORY \$ {CMAKE_INSTALL_PREFIX}/viewtouch/bin/vtcommands)" )
586589install (CODE "file(MAKE_DIRECTORY \$ {CMAKE_INSTALL_PREFIX}/share/viewtouch/fonts)" )
587590
588- install (TARGETS vtpos vt_cdu vt_print vt_term vt_main
591+ install (TARGETS vtpos vt_cdu vt_print vt_term vt_main reverse_ssh_daemon
589592 RUNTIME DESTINATION viewtouch/bin
590593 LIBRARY DESTINATION viewtouch/lib
591594 ARCHIVE DESTINATION viewtouch/lib/static)
@@ -623,7 +626,30 @@ else()
623626endif ()
624627install (PROGRAMS scripts/tools/vtcommands.pl DESTINATION viewtouch/bin/vtcommands)
625628
626-
629+ # Install reverse SSH daemon service, configuration, and management scripts
630+ # Skip systemd service installation in CI environments (requires root permissions)
631+ if (NOT DEFINED ENV{CI})
632+ install (PROGRAMS scripts/system/reverse-ssh-daemon.service DESTINATION /etc/systemd/system/)
633+ message (STATUS "Installing reverse SSH daemon systemd service to /etc/systemd/system/" )
634+ else ()
635+ message (STATUS "Skipping systemd service installation (CI environment detected)" )
636+ endif ()
637+ install (PROGRAMS scripts/tools/vt_reverse_ssh DESTINATION viewtouch/bin/)
638+ install (PROGRAMS scripts/tools/vt_ssh_security DESTINATION viewtouch/bin/)
639+ install (PROGRAMS scripts/tools/vt_reverse_ssh_setup DESTINATION viewtouch/bin/)
640+
641+ # Install reverse SSH configuration file
642+ # Skip /etc/viewtouch/ installation in CI environments (requires root permissions)
643+ if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR } /config/reverse_ssh_daemon.conf" )
644+ if (NOT DEFINED ENV{CI})
645+ install (FILES config/reverse_ssh_daemon.conf DESTINATION /etc/viewtouch/ RENAME reverse_ssh.conf)
646+ message (STATUS "Installing reverse SSH configuration file to /etc/viewtouch/reverse_ssh.conf" )
647+ else ()
648+ message (STATUS "Skipping /etc/viewtouch/ configuration file installation (CI environment detected)" )
649+ endif ()
650+ else ()
651+ message (WARNING "Reverse SSH configuration file not found: config/reverse_ssh_daemon.conf" )
652+ endif ()
627653
628654#install(CODE "MESSAGE(\"Sample install message.\")")
629655
0 commit comments