Skip to content

Instantly share code, notes, and snippets.

muenchow /
Last active Aug 31, 2021
TeamSpeak SSH-Query Example using Python
from paramiko import SSHClient, AutoAddPolicy
from sys import exit
def connect(host, port, username, password):
ssh_client = SSHClient()
ssh_client.connect(host, port=port, username=username, password=password)
return ssh_client.invoke_shell('raw')
def write_line(channel, line):
muenchow / teamspeak_ssh_query_example.php
Last active Jul 28, 2018
TeamSpeak SSH-Query Example using PHP
View teamspeak_ssh_query_example.php
function connect($host, $port, $username, $password)
$connection = ssh2_connect($host, $port);
if (!$connection)
die('Connection failed');
if (!ssh2_auth_password($connection, $username, $password))
die('Authentication Failed...');