Documentation
¶
Overview ¶
Copyright 2015 Gravitational, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2015 Gravitational, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
const ( DefaultLimit = 20 Asc = 1 Desc = -1 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthAttempt ¶
type AuthAttempt struct {
// Session is SSH session ID
SessionID string `json:"sid"`
// User is SSH user
User string `json:"user"`
// Success - true if auth was successfull, false otherwise
Success bool `json:"success"`
// Error contains rejection reason if present
Error string `json:"error"`
// LocalAddr local connecting address
LocalAddr string `json:"laddr"`
// RemoteAddr remote connecting address
RemoteAddr string `json:"raddr"`
// Key is a public key used for auth
Key string `json:"key"`
}
AuthSuccess indicates a successfull connection and authentication attempt
func NewAuthAttempt ¶
func NewAuthAttempt(conn ssh.ConnMetadata, key ssh.PublicKey, success bool, err error) *AuthAttempt
func (*AuthAttempt) Schema ¶
func (*AuthAttempt) Schema() string
type Exec ¶
type Exec struct {
// User is SSH user
User string `json:"user"`
SessionID string `json:"sid"`
// Command is a command name with arguments
Command string `json:"command"`
// Code is a return code
Code int `json:"code"`
// Error is a error if command failed to execute
Error string `json:"error"`
// Log is a captured command output
Log string `json:"out"`
}
Exec is a result of execution of a remote command on the target server
type Message ¶
type Message struct {
// User is SSH user
User string `json:"user"`
SessionID string `json:"sid"`
// Message
Message string `json:"message"`
}
Message is a user message sent in a session
type ShellSession ¶
type ShellSession struct {
SessionID string `json:"sid"`
// Shell is a shell name
Shell string `json:"command"`
// RecordID holds the id with the session recording
RecordID string `json:"rid"`
// User is SSH user
User string `json:"user"`
// LocalAddr local connecting address
LocalAddr string `json:"laddr"`
// RemoteAddr remote connecting address
RemoteAddr string `json:"raddr"`
}
Shell is a result of execution of a in interactive shell
func NewShellSession ¶
func NewShellSession(sid string, conn ssh.ConnMetadata, shell string, recordID string) *ShellSession
func (*ShellSession) Schema ¶
func (*ShellSession) Schema() string