Detailed reference of prototypes, properties and methods available in the
Javascript environment of your Helma web applications.

Fields and methods of the helma.Ssh class.
To use this optional module, its repository needs to be added to the application, for example by calling app.addRepository('modules/helma/Ssh.js')
helma Ssh(server, hosts)
Creates a new instance of helma.Ssh
parameters

String | server | The server to connect to
helma.File, java.io.File, String | hosts | Either a file containing a list of known hosts, or the path pointing to a file. This argument is optional.

methods

- addKnownHosts(file)

- connect(username, password)

- connectWithKey(username, key, passphrase)

- disconnect()

- isConnected()

- put(localFile, remoteDir, mode)

- get(remoteFile, targetDir)

- execCommand(cmd)

- setParanoid(p)

- isParanoid()

Methods
helma.Ssh. addKnownHosts(file)
Opens the file passed as argument and adds the known hosts therein to the list of known hosts for this client.
parameters

helma.File, java.io.File, String | file | Either a file object or the path to a file containing a list of known hosts

returns

| True if adding the list was successful, false otherwise

helma.Ssh. connect(username, password)
Connects to a remote host using plain username/password authentication.
parameters

String | username | The username
String | password | The password

returns

| True in case the connection attempt was successful, false otherwise.

helma.Ssh. connectWithKey(username, key, passphrase)
Connects to a remote host using a private key and the corresponding passphrase.
parameters

String | username | The username
helma.File, java.io.File, String | key | Either a file object representing the private key file, or the path to it.
String | passphrase | The passphrase of the private key, if necessary.

returns

| True in case the connection attempt was successful, false otherwise.

helma.Ssh. disconnect()
Disconnects this client from the remote server.
helma.Ssh. isConnected()
Returns true if this client is currently connected.
returns

| True in case this client is connected, false otherwise.

helma.Ssh. put(localFile, remoteDir, mode)
Copies a local file to the remote server
parameters

String, Array | localFile | Either the path to a single local file or an array containing multiple file paths that should be copied to the remote server.
String | remoteDir | The path to the remote destination directory
String | mode | An optional 4-digit permission mode string (eg. `0755`);

returns

| True in case the operation was successful, false otherwise.

helma.Ssh. get(remoteFile, targetDir)
Retrieves a file from the remote server and stores it locally.
parameters

String, Array | remoteFile | Either the path to a single remote file or an array containing multiple file paths that should be copied onto the local disk.
String | targetDir | The path to the local destination directory

returns

| True if the copy process was successful, false otherwise.

helma.Ssh. execCommand(cmd)
Executes a single command on the remote server.
parameters

String | cmd | The command to execute on the remote server.

returns

| The result of the command execution

helma.Ssh. setParanoid(p)
Toggles paranoid mode. If set to true this client tries to verify the host key against the its list of known hosts during connection and rejects if the host key is not found therein or is different.
parameters

Boolean | p | Either true or false

helma.Ssh. isParanoid()
Returns true if this client is in paranoid mode.
returns

| Boolean

see

helma.Ssh.setParanoid

Tue, 25 Nov 2008 16:50:10 GMT.

### core framework

- global
- app (application)
- req (request)
- res (response)
- session
- path
- root
- HopObject
- User
- File
- FtpClient
- Image
- Mail
- Remote
- Xml
- DatabaseObject
- MimePart
- Skin
- Object

### optional modules

- Array extensions
- Date extensions
- Number extensions
- Object extensions
- String extensions
- HopObject extensions
- global macros
- macro filters
- JSON methods
- helma.Aspects
- helma.Chart
- helma.Color
- helma.Database
- helma.File
- helma.Ftp
- helma.Group
- helma.Html
- helma.Http
- helma.Image
- helma.Mail
- helma.Search
- helma.Skin
- helma.Ssh
- helma.Url
- helma.Zip
- jala.BitTorrent
- jala.Captcha
- jala.Date
- jala.db
- jala.DnsClient
- jala.Form
- jala.History
- jala HopObject extensions
- jala.HtmlDocument
- jala.I18n
- jala.ImageFilter
- jala.IndexManager
- jala.ListRenderer
- jala.Mp3
- jala.PodcastWriter
- jala.RemoteContent
- jala.Rss20Writer
- jala.Utilities
- jala.XmlRpcRequest
- jala.XmlWriter

### java libraries

- browse docjar