26 lines
724 B
C
26 lines
724 B
C
#ifndef SSH_CLIENT_H
|
|
#define SSH_CLIENT_H
|
|
|
|
#include <stdbool.h>
|
|
|
|
/**
|
|
* Read the ATECC608B public key, format it as an SSH authorized_keys entry,
|
|
* and print it to the console. Call this once at boot so the key can be
|
|
* added to the server's authorized_keys file.
|
|
*
|
|
* 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
|
|
* ATECC608B 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 */
|