I manage to fixed after changed my code
remote_conn_pre = paramiko.SSHClient()
remote_conn_pre.set_missing_host_key_policy(
paramiko.AutoAddPolicy())
remote_conn_pre.connect(ip, username=username, password=password)
print '\n' + '\n' + "[-] SSH connection established successfully to %s" % ip + '\n'
remote_conn = remote_conn_pre.invoke_shell()
remote_conn.send('get hostname\n')
time.sleep(2)
output = remote_conn.recv(1048576)
print output