Jörg Thalheim
50dc6c4c50
fix ssh master on macos
2025-05-14 20:30:36 +02:00
Qubasa
01f9bb358e
clan-cli: Use machine object everywhere instead of name + flake
2025-05-09 13:13:14 +02:00
Jörg Thalheim
f3c673d165
only apply ssh control master to local ssh connection
2025-05-06 13:11:30 +02:00
Jörg Thalheim
5846f5d63a
Host: actual setup ssh controlmaster
...
before we were not entering the context manager
2025-05-06 13:11:30 +02:00
Jörg Thalheim
be79d75c08
bind ssh controlmaster to live time of CLI
2025-05-04 16:28:14 +02:00
Jörg Thalheim
dc4268dbf2
fix ssh control master check ( #3488 )
...
Co-authored-by: pinpox <git@pablo.tools >
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3488
Co-authored-by: Jörg Thalheim <joerg@thalheim.io >
Co-committed-by: Jörg Thalheim <joerg@thalheim.io >
2025-05-04 12:49:53 +00:00
Jörg Thalheim
9af16037a2
Revert "Merge pull request 'Fix deploying with sudo + password' ( #3470 ) from target-host into main"
...
This reverts commit fbc0f9cde5 , reversing
changes made to b47c25c620 .
2025-05-04 13:37:39 +02:00
Jörg Thalheim
39880f9434
fix upload when sudo prompts are needed
2025-05-04 10:51:49 +02:00
Mic92
b47c25c620
Merge pull request 'Miscellaneous ssh fixes.' ( #3487 ) from misc-fixes into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3487
2025-05-04 08:51:31 +00:00
Jörg Thalheim
fb4421427b
Host: always set needs_user_terminal for ssh commands, only override prefix if given by user
2025-05-04 10:39:39 +02:00
Jörg Thalheim
35ee7986d7
rename connect_ssh_shell to interactive_ssh
...
better name than secure shell shell
2025-05-04 10:28:43 +02:00
Jörg Thalheim
75cb031e6e
move password/tor_socks into Host attributes
...
we set those parameters usually just once.
2025-05-04 10:28:43 +02:00
Jörg Thalheim
2f32e5bde2
configure ControlMaster and ControlPath for SSH connections
...
This should speed up deployments by not having to reconnect to the server on each command
2025-05-04 09:48:37 +02:00
Qubasa
3214d27f0b
clan-cli: Improve remote destination depth validation with detailed error messaging
2025-04-25 14:00:40 +02:00
Qubasa
f1a7f2aa69
clan-cli: Expose private_key to Machine class, in the future we should merge Machine and Host class
2025-04-25 13:38:03 +02:00
Michael Hoang
3480912d8d
cli: fix unnecessary sudo when unspecified user defaults to root
2025-04-22 23:39:46 +10:00
Jörg Thalheim
723d72255c
Reapply "remove nix_shell_legacy"
...
This reverts commit c5001f19fc .
2025-04-21 13:23:50 +02:00
Johannes Kirschbauer
c5001f19fc
Revert "remove nix_shell_legacy"
...
This reverts commit f3512b853a .
2025-04-18 14:49:54 +02:00
Jörg Thalheim
f3512b853a
remove nix_shell_legacy
2025-04-16 21:03:58 +02:00
Jörg Thalheim
837789010e
rename nix_shell_legacy to nix_shell and run_cmd to nix_shell
...
Than it's more obvious that we need to migrate.
2025-04-16 18:27:01 +00:00
Jörg Thalheim
3e8f3046ec
Host: migrate from nix_shell to run_cmd
2025-04-16 19:32:40 +02:00
Qubasa
3bd766e0a0
clan-cli: Fix single file upload in upload.py, add test for edge case
2025-04-11 19:08:13 +02:00
Jörg Thalheim
340bf4752f
ssh/upload: fix shell quoting
2025-04-04 15:10:09 +00:00
Jörg Thalheim
eaf20ae09a
tests: add fake_sudo to sshd fixture
...
This allows to use the same code for both testing and real-world.
2025-03-28 17:14:22 +00:00
Qubasa
2406a62ce0
test_secrets_upload: Don't prepend sudo inside test; Improve secret upload test
2025-03-28 17:14:22 +00:00
Qubasa
0afbf9dd45
checks/installation-without-system: modify to install through normal user instead of root
2025-03-26 18:37:31 +01:00
RTUnreal
0ea9b45838
clan_cli: fix support for non-root deployment user
2025-03-26 18:37:31 +01:00
Qubasa
eb9b4bdb6b
clan-cli: Make host upload function support uploading single files too
2025-03-01 17:10:42 +01:00
lassulus
669a28c4e5
clan-cli: set ssh port for nix copy
2025-02-28 04:58:42 +00:00
lassulus
d171d99923
clan-cli deploy_info: fix find_reachable_host returning unreachable hosts
2025-02-22 03:39:42 +00:00
Louis Opter
c689c23d0c
clan-cli: "fix" ssh option parsing
...
Calling it fix in double quotes since that's still quite hand-crafted,
but at least you can now specify options with `@` inside them (e.g.
`ProxyJump`) and have it work properly.
Moreover this fixes the syntax for GET-like variables in the networking
clanCore module. Only the fixed syntax is supported since that's what
was tested, and actually parsed in the code.
2025-02-18 21:37:38 +00:00
Qubasa
5ceec3844a
clan-cli: Add from_host function to Host class
2025-01-29 19:18:02 +07:00
Pablo Ovelleiro Corral
e4d3c03392
Implement clan ssh <hostname>
...
Fixes #2317
2025-01-11 23:15:39 +01:00
Qubasa
a452cc1a02
clan-cli: Fix clan install command and multiple other issues
2024-12-18 15:29:08 +01:00
Qubasa
fee5cf6c06
clan-cli: Make clan ssh automatically start tor
2024-12-17 12:13:18 +01:00
DavHau
49ee32f610
ssh: improve parsing of ipv6 hostnames
2024-12-15 17:46:50 +07:00
Qubasa
6b784f8623
clan-cli: Rework 'clan ssh' command, improve Tor support.
2024-12-13 00:11:18 +01:00
Qubasa
65a5789c5b
clan-cli: Replace HostGroup and MachineGroup with generic AsyncRuntime class. Propagate cmd prefix over thread local. Close threads on CTRL+C
2024-12-09 18:07:23 +01:00
Qubasa
570bceff4e
clan-cli: Fix ignored debug flag in clan vms run, refactor Host.run to use RunOpts
2024-12-03 16:01:51 +01:00
Qubasa
cc8c76e4d4
clan-cli: refactor HostGroup._run_local to work with RunOpts
2024-11-28 16:05:51 +01:00
Qubasa
1f98df96e3
clan-cli: cmd.run now has its options extracted to a dataclass
2024-11-28 15:26:37 +01:00
Qubasa
9c2c33d577
clan-cli: SSH now completely refactored to use dataclasses everywhere
2024-11-28 10:52:14 +01:00
Qubasa
80045a9af1
clan-cli: Add -L option to nixos-rebuild switch to still have build output, simplify logging code
2024-11-28 10:42:43 +01:00
Qubasa
a1a367c57c
clan-cli: Refactor colors to a subset of colors that work in light and dark mode
2024-11-27 12:42:10 +01:00
Qubasa
b9154fddd2
clan-cli: Refactor ssh classes to dataclasses
2024-11-25 19:47:17 +01:00
Qubasa
979e5e839d
clan-cli: Refactor ssh part 2, Refactor custom_logger
2024-11-22 22:08:50 +01:00
Qubasa
a4f3d9d1fc
clan-cli: Refactor ssh folder part 1
2024-11-21 13:02:22 +01:00
Qubasa
26730cd662
clan-cli: upload.py -> Replace rsync with native ssh command
2024-11-15 22:03:47 +07:00
Jörg Thalheim
d3abedafa9
don't show stacktrace if update fail
2024-11-08 15:43:10 +01:00
DavHau
21d08ad780
ssh: fix ssh connections failing due to missing stdin
2024-10-28 17:56:12 +07:00