Skip to content
Henrik edited this page Aug 21, 2014 · 1 revision

Connect to a remote PuTTY SSH Server and execute commands.

plink :unpack do |cmd|
  cmd.command = "path/to/plink"
  cmd.host = "mywebserver"
  cmd.port = "1234"
  cmd.user = "username"
  cmd.key = "path/to/keyfile"
  cmd.commands = [
    "cd /webapp/", 
    "unzip website.zip"
  ]
end

Required Parameters

Command

The path to the plink application.

command = "path/to/plink"

Host

The remote host to connect to.

host = "mywebserver"

Commands

The commands to execute on the remote host.

commands = [
  "cd /webapp/", 
  "unzip website.zip"
]

Optional Parameters

Port

The port on the remote host to connect to (defaults to 22, the SSH port)

port = 1234

User

The user to connect as on the remote host.

user = "username"

Key

The path to the key for connecting securely to the remote host.

key = "path/to/keyfile"

Verbose

Run plink with verbose output.

verbose

Guidance

(none)

Clone this wiki locally