-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Negotiation fail #3
Comments
Thanks for your feedback,to fix this error i need your configuration file (ssh-panel.sublime-settings and remove sensitive information) and error message (line numbers and files) in the console. |
If your connection is unstable, you can try increasing the value of |
Hello, Thank you for your reply! Here is the output of the ST console:
and here are my settings:
|
fixing suggestions:
{
"server_settings": {
"SondelBay": {
"hostname": "ip",
"username": "user",
"password": "pass",
"save_password": true,
"port": port,
"network_timeout": 50,
"remote_path": [
"/home/user/domain"
],
"local_path": "~/SFTP-Local/{auto_generate}"
}
}
}
|
This plugin uses the paramiko library in Python3.8. you can run and test this code in sublime text console: import paramiko,threading
username = "user" # set value
password = "pass" # set value
hostname = "ip address" # set value
test_remote_file = "/etc/os-release" # set value
port = 22 # set value
timeout = 50 # set value
transport = paramiko.Transport(sock=(hostname,port))
event = threading.Event()
transport.start_client(event=event,timeout=timeout)
while True:
event.wait(0.1)
if event.is_set():
if not transport.is_active():
print("Negotiation Failed")
else:
print("Negotiation Successful")
break
transport.auth_password(
username = username,
password = password
)
print("Password Authentication Successful")
channel = transport.open_session(timeout=timeout)
channel.invoke_subsystem('sftp')
channel.settimeout(0.5) # This value is fixed, you can try increasing it !!!!
sftp_client = paramiko.SFTPClient(sock=channel)
with sftp_client.open(test_remote_file,"rb") as rf:
content = rf.read()
if len(content) > 0:
print(content)
print(test_remote_file,"test OK")
print("Connect Close")
sftp_client.close()
transport.close() |
Do you need a proxy to connect to your SSH server? |
I don't know if it was the update, but I could connect successfully both in console and plugin!
Thank you for the update! ps. I am not using proxys for this server. The setting keys were desperate attempts to pass some additional parameters, but I have removed them. |
My pleasure 😊 |
Hello,
Seems like a great plugin. Unfortunately I haven't been able to connect to a host. I get the following error:
I am not really familiar with paramiko but maybe it's a simple fix?
Kind regards
The text was updated successfully, but these errors were encountered: