subhra74 / snowflake

Graphical SFTP client and terminal emulator with helpful utilities
GNU General Public License v3.0
2.17k stars 231 forks source link

Error to connect without giving a reason #75

Open daniejstriata opened 4 years ago

daniejstriata commented 4 years ago

When I attempt a connection and it fails I cannot find out why it failed.

Is it not possible to give more detail than this as to why connection failed? image ssh client has no issues connecting to that host. I can only connect to localhost using Snowflake on Mint 19.3

JeffHochberg commented 4 years ago

I'm experiencing this issue as well. I've installed Snowflake 1.0.3 on a system running Windows 10 Professional (host) and Ubuntu 18.04 LTS (guest via VMware Workstation Pro 15.5).

I've tried to use Snowflake to SSH to a number of hosts and am unable to connect. I just receive "Unable to connect to server..." and no additional feedback.

I can use Putty on the Windows 10 machine and the traditional OpenSSH client from within the VM to connect to the same hosts without any issues.

Is there a way to troubleshoot this? Are there any logs I can look at/upload to this bug so we can determine the root cause?

JeffHochberg commented 4 years ago

I just did a little more testing. Instead of launching Snowflake directly from the shortcut, I ran it from the command line. I saw the following message written to stdout:

java.lang.Exception: User name is not present at snowflake.common.ssh.SshClient.connect(SshClient.java:68) at snowflake.components.terminal.ssh.SshTtyConnector.init(SshTtyConnector.java:40)

I went back into Snowflake, edited the connection, and added a username, then tried again. The connection was successful!

The error handling should return a message within the GUI stating that the username is not defined in the connection upon trying to initiate a SSH session and, if the username is indeed a mandatory attribute, you should not be able to save/connect to a host if you do not enter a username into the profile.

However, IMHO, the username should not be a mandatory attribute within a given connection. Any time I use other GUI-based SSH clients, I do not have to specify the username. Instead, I'm prompted to supply a username once connected to the host.

daniejstriata commented 4 years ago

Thanks for that tip. I'll try it. I'm using keys added to ssh-agent and I guess that snowflake is not aware of that.

I agree. If no username is supplied then a pop-up box could prompt for one if the username is missing.