I am using sockets to connect to Coral devboard. I want to connect to the devboard and execute a classification script. Whenever I execute my code (lines below) , it shows "In [3]:" for around 10 seconds as if waiting for something. Then "In [4]" appears. What is it happening? I already sent the user and password.
This is my code:
import socket
TCP_IP = '172.16.1.11'
TCP_PORT = 22
BUFFER_SIZE = 1024
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((TCP_IP, TCP_PORT))
s.send(b'login')
print(s.recv(BUFFER_SIZE).decode())
s.send(b'mendel')
print(s.recv(BUFFER_SIZE).decode())
s.send(b'Password')
print(s.recv(BUFFER_SIZE).decode())
s.send(b'password')
print(s.recv(BUFFER_SIZE).decode())
THIS IS WHAT IS SHOWN IN THE CONSOLE
In [3]: runfile('C:/Users/Coral/Classification/demo_socket.py', wdir='C:/Users/Coral/Classification')
SSH-2.0-OpenSSH_7.9p1 Debian-10+deb10u2
In [4]:
EDIT
When I am using:
ssh mendel@172.16.1.11
I am already talking to the SSH server. Whay can't I just write the login and password using python instead of writing it with my fingers?