Net::SSH::Perl::Constants - Exportable constants
use Net::SSH::Perl::Constants qw( constants );
provides a list of common and useful constants
for use in communicating with an sshd server, etc.
None of the constants are exported by default; you have to explicitly ask for
them. Some of the constants are grouped into bundles that you can grab all at
once, or you can just take the individual constants, one by one.
If you wish to import a group, your use
statement should look something
use Net::SSH::Perl::Constants qw( :group );
Here are the groups:
All of the MSG constants. In the SSH packet layer protocol, each packet is
identified by its type; for example, you have a packet type for starting
RSA authentication, a different type for sending a command, etc. The MSG
constants are used when creating a new packet, then:
my $packet = $ssh->packet_start( I<msg_constant> );
See the Net::SSH::Perl::Packet and Net::SSH::Perl docs for
Net::SSH::Perl doesn't support all of the features of the ssh
client, so it doesn't need all of its MSG constants. For a full list of
such constants, and an explanation of each, see the SSH RFC.
Here's the list of MSG constants supported by Net::SSH::Perl:
SSH_MSG_NONE, SSH_MSG_DISCONNECT, SSH_SMSG_PUBLIC_KEY,
SSH_CMSG_SESSION_KEY, SSH_CMSG_USER, SSH_CMSG_AUTH_RHOSTS,
SSH_CMSG_AUTH_RSA_RESPONSE, SSH_CMSG_AUTH_PASSWORD, SSH_CMSG_EXEC_SHELL,
SSH_CMSG_EXEC_CMD, SSH_SMSG_SUCCESS, SSH_SMSG_FAILURE,
SSH_CMSG_STDIN_DATA, SSH_SMSG_STDOUT_DATA, SSH_SMSG_STDERR_DATA,
SSH_CMSG_EOF, SSH_SMSG_EXITSTATUS, SSH_MSG_IGNORE,
SSH_CMSG_EXIT_CONFIRMATION, SSH_CMSG_AUTH_RHOSTS_RSA, SSH_MSG_DEBUG,
The HOST constants: HOST_OK, HOST_NEW, and HOST_CHANGED. These are returned
from the "_check_host_in_hostfile" routine in
Net::SSH::Perl::Util. See those docs for that routine for an
explanation of the meaning of these constants.
The AGENT constants, used when talking to an authentication agent:
SSH_AGENTC_RSA_CHALLENGE, SSH_AGENT_RSA_RESPONSE, SSH_AGENT_FAILURE,
Other exportable constants, not belonging to a group, are:
These two constants describe the version of the protocol supported by this
SSH client (ie., Net::SSH::Perl). They're used when identifying the
client to the server and vice versa.
A special ID string written to private key files; if the ID string in the
file doesn't match this, we stop reading the private key file.
The maximum size of a packet in the packet layer.
Please see the Net::SSH::Perl manpage for author, copyright, and license