Documentation ¶
Overview ¶
Copyright © 2021 Nikhil Prabhu
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright © 2021 Nikhil Prabhu ¶
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright © 2021 Nikhil Prabhu ¶
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Password ¶
func Password(pword string) ssh.AuthMethod
Password parses a string into an SSH password
Types ¶
type ConnectionParams ¶
type ConnectionParams struct { User string Addr string Auth ssh.AuthMethod HostKey string }
ConnectionParams are the parameters required to establish an SSH connection
type SSHClient ¶
We define a custom SSH client type so we can define our own methods for it
func Connect ¶
func Connect(c ConnectionParams) (*SSHClient, error)
Connect establishes an SSH connection with a specified address and returns the client. For ports other than the default (22), the port number must be appended to the address
Example: 192.168.2.122:2222