You do not need EU CONDITION. Because if authentication fails, the script will throw an exception in any case and will not execute the rest of the instructions
, ssh.connect, , .
IF CONDITION, ,
conn = ssh.connect(device, username=username, password=password, timeout=4)
if conn is None:
print "Successfully Authenticated"
user966588