Lab 12: Powershell and SSH - squatchulator/Tech-Journal GitHub Wiki

ssh.ps1

# Storyline: Login to a remote SSH server.

# New-SSHSession -ComputerName '192.168.4.22' -Credential (Get-Credential sys320)

# while ($True) {

    # Add a prompt to run commands
    # $the_cmd = read-host -Prompt "Please enter a command"

    # Run a command on a remote SSH server
    # (Invoke-SSHCommand -index 0 $the_cmd).Output
# }

Set-SCPFile -Computername '192.168.4.22' -Credential (Get-Credential sys320) `
-RemotePath '/home/sys320' -LocalFile '.\tdex.jpeg'