Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
ssh.hh
Go to the documentation of this file.
1#pragma once
3
6#include "lix/libutil/sync.hh"
7#include <cstdint>
8
9namespace nix {
10
11class SSH
12{
13private:
14
15 const std::string host;
16 const std::optional<uint16_t> port;
17 bool fakeSSH;
18 const std::string keyFile;
19 const std::string sshPublicHostKey;
20 const bool compress;
21 const int logFD;
22
23 struct State
24 {
25 std::unique_ptr<AutoDelete> tmpDir;
26 };
27
28 Sync<State> state_;
29
30 void addCommonSSHOpts(Strings & args);
31
32public:
33
34 SSH(const std::string & host, const std::optional<uint16_t> port, const std::string & keyFile, const std::string & sshPublicHostKey, bool compress, int logFD = -1);
35
37 {
38 Pid sshPid;
39 AutoCloseFD out, in;
40 };
41
42 std::unique_ptr<Connection> startCommand(const std::string & command);
43};
44
45}
Definition file-descriptor.hh:51
Definition processes.hh:24
Definition sync.hh:37
Definition ssh.hh:37