use Net::SSH::Perl; my $ssh = Net::SSH::Perl->new( "www.blah.blah.blah.com", identity_files => '~/.ssh/bkp', debug => true, #same as -v use_pty => 1, #request pseudo-tty, same as -t option, I think options => [ "ForwardX11 no", # same as -x "ForwardAgent no", # same as -a if I'm not wrong # all desired options passed as # "option value", # you can choose also any of these: ... "AddressFamily 'any'", "BatchMode yes/no", "BindAddress ... ", "ChallengeResponseAuthentication yes/no", "CheckHostIP yes/no", "Cipher 3des", "Ciphers ...", "ClearAllForwardings ...", "Compression ...", "CompressionLevel ...", "ConnectionAttempts ...", "ConnectTimeout ...", "ControlMaster ...", "ControlPath ...", "ControlPersist ...", "DynamicForward ...", "EscapeChar ...", "ExitOnForwardFailure ...", "ForwardX11Timeout ...", "ForwardX11Trusted ...", "GatewayPorts ...", "GlobalKnownHostsFile ...", "GSSAPIAuthentication ...", "GSSAPIDelegateCredentials ...", "HashKnownHosts ...", "Host ...", "HostbasedAuthentication ...", "HostKeyAlgorithms ...", "HostKeyAlias ...", "HostName ...", "IdentityFile '~/.ssh/bkp'", "IdentitiesOnly ...", "IPQoS ...", "KbdInteractiveAuthentication ...", "KbdInteractiveDevices ...", "KexAlgorithms ...", "LocalCommand ...", "LocalForward ...", "LogLevel ...", "MACs ...", "NoHostAuthenticationForLocalhost ...", "NumberOfPasswordPrompts ...", "PasswordAuthentication ...", "PermitLocalCommand ...", "PKCS11Provider ...", "Port 9999999", "PreferredAuthentications ...", "Protocol '2,1'", # 2 preferred, 1 also acceptable "ProxyCommand ...", "PubkeyAuthentication ...", "RekeyLimit ...", "RemoteForward ...", "RequestTTY ...", "RhostsRSAAuthentication ...", "RSAAuthentication ...", "SendEnv ...", "ServerAliveInterval ...", "ServerAliveCountMax ...", "StrictHostKeyChecking ...", "TCPKeepAlive ...", "Tunnel ...", "TunnelDevice ...", "UsePrivilegedPort ...", "User ...", "UserKnownHostsFile ...", "VerifyHostKeyDNS ...", "VisualHostKey ...", "XAuthLocation ..." ]);