Files
keypitecc/main/ssh_client.h
2026-04-17 18:56:01 +02:00

25 lines
662 B
C

#ifndef SSH_CLIENT_H
#define SSH_CLIENT_H
#include <stdbool.h>
/**
* Derive the public key from the eFuse ECDSA private key, format it as an
* SSH authorized_keys entry, and print it to the console.
*
* Output format:
* ecdsa-sha2-nistp256 <base64-blob> keypitecc
*/
void ssh_print_public_key(void);
/**
* Open a TCP connection to the configured SSH server, authenticate using the
* eFuse ECDSA hardware key, execute @p cmd, log the output, and disconnect.
*
* @param cmd Shell command string to run on the remote host.
* @return true on success, false on any error.
*/
bool ssh_execute_command(const char *cmd);
#endif /* SSH_CLIENT_H */