Skip to content
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

Can't browse through ssh #519

Closed
fulalas opened this issue Jun 30, 2017 · 33 comments
Closed

Can't browse through ssh #519

fulalas opened this issue Jun 30, 2017 · 33 comments

Comments

@fulalas
Copy link

fulalas commented Jun 30, 2017

Is there any trick to access files/folders through ssh? The first time I try to do it pcmanfm-qt show me this dialog:

ssh

If I click on 'Login anyway' I see this:

ssh01

Pressing 'OK' I see this:

ssh02

And no files are shown.

If I try to access ssh through terminal everything works fine.

@tsujan
Copy link
Member

tsujan commented Jun 30, 2017

I use SFTP without problem; haven't tried other methods.

@fulalas
Copy link
Author

fulalas commented Jun 30, 2017

After all these errors, the address is automatically set to sftp. It makes no difference for me, as I get the same error.

I'm trying with Porteus (Slackware based), but I get the same error using Lubuntu Next Alpha (released today).

@tsujan
Copy link
Member

tsujan commented Jun 30, 2017

For SFTP, you should enable and start the sshd service on the remote computer.

@fulalas
Copy link
Author

fulalas commented Jun 30, 2017

Do you see the first dialog? I've just found out that if I login first through terminal then everything works fine inside pcmanfm-qt. So maybe the problem is related to login.

@tsujan
Copy link
Member

tsujan commented Jun 30, 2017

Do you see the first dialog?

No I don't. When I put the SFTP address in pcmanfm-qt and press enter, a login dialog shows up, I enter the user password of the remote computer and then can see the remote user home and transfer files. Sorry, I can't attach a screenshot right now.

@fulalas
Copy link
Author

fulalas commented Jun 30, 2017

I start it this way: /etc/rc.d/rc.sshd start

But it's not enough. I had also to access remote machine through terminal once, this way: ssh user@ip

Then back to pcmanfm-qt if I try to access remote machine again I get this:

ssh03

And I finally can login with success.

@tsujan
Copy link
Member

tsujan commented Jun 30, 2017

Yes, that's the password/login dialog I talked about. Did you start sshd on the remote computer?

@fulalas
Copy link
Author

fulalas commented Jun 30, 2017

Yes. I'm doing in the same machine or in a VM. Anyway, it only works through terminal, or first attempt through terminal and then pcmanfm-qt. I guess there's some problem with the login dialog.

@tsujan
Copy link
Member

tsujan commented Jun 30, 2017

As I said above, I can't confirm that. I use SFTP when I want to transfer files between my laptop and desktop computer and have never encountered a problem.

@fulalas
Copy link
Author

fulalas commented Jun 30, 2017

If you're not seeing that first dialog in my first post, you're probably doing the first login outside pcmanfm-qt (maybe the login information it's already set somewhere?).

We need to reproduce the scenario where user tries to login for the first time inside pcmanfm-qt, because that's the problem. You can try a live boot (no need to install) of Lubuntu Next inside a VM. I tried here and the issue is easily reproducible; you just need to open a pcmanfm-qt instance and type ssh://userRealMachine@ipRealMachine : http://cdimage.ubuntu.com/lubuntu-next/releases/17.10/alpha-1/artful-desktop-amd64.iso

@tsujan
Copy link
Member

tsujan commented Jun 30, 2017

If you're not seeing that first dialog in my first post, you're probably doing the first login outside pcmanfm-qt

False assumptions lead to false conclusions and then, to confusion. I do no login outside pcmanfm-qt.

@tsujan
Copy link
Member

tsujan commented Jun 30, 2017

And, as I said above, I only use sftp://user@ip/home/user.

@fulalas
Copy link
Author

fulalas commented Jun 30, 2017

Take it easy, man. :)

Trust me, you did login first outside pcmanfm-qt. But pcmanfm-qt asks for login anyway, even if you did login outside it. Please, if you have time try Lubuntu Next and you'll see the problem I'm talking about, otherwise that first dialog I shown you (which, as far as I understand, belongs to pcmanfm-qt) will never be tested.

And ssh:// or sftp:// is the same thing for pcmanfm-qt. You can check.

@tsujan
Copy link
Member

tsujan commented Jun 30, 2017

LOL! You mean I have two separate personalities, one of which logs in outside pcmanfm-qt, the other one only uses pcmanfm-qt, and they don't know about each other? That may explain how I'm writing code and replying to you simultaneously ;)

@fulalas
Copy link
Author

fulalas commented Jun 30, 2017

I'm just saying that probably the first time ever your machine accessed another machine via ssh was not through pcmanfm-qt, and then the credentials were stored somewhere, so that's why you now can access through pcmanfm-qt without any problem.

But if you don't have time to test that pcmanfm-qt dialog (which is the main issue), I don't see the meaning of any discussion.

@tsujan
Copy link
Member

tsujan commented Jun 30, 2017

I don't see the meaning of any discussion.

Agreed. When I answer to your question with "No", you say it should be a "Yes"!! There's nothing to discuss.

@fulalas
Copy link
Author

fulalas commented Jun 30, 2017

Just to know if I understood correctly: you're not going to test that first pcmanfm-qt dialog I shown you in my first post (considering that I gave you the step-by-step of how to reproduce it)? If you're not, it's because you're busy (if so, it's totally comprehensible), or just because?

@tsujan
Copy link
Member

tsujan commented Jun 30, 2017

I can't test anything for a while because I'm very busy. There's no reason to think otherwise. The reason why I replied to this was that sftp has ALWAYS worked here and I thought that if you knew that, you might find your way. My intention was helping you quickly. There are lots of pages on Internet that explain how to use sftp on Linux.

@fulalas
Copy link
Author

fulalas commented Jun 30, 2017

The problem, of course, has nothing to do with my knowledge regarding ssh/sftp, but a bug in LXQt.

Thanks for your precious time. 👍

@vc-01
Copy link

vc-01 commented Jun 30, 2017

This problem occurs when connecting to a host which is not in ~/.ssh/known_hosts. (Just quick response, no fix prepared yet...)

@agaida
Copy link
Member

agaida commented Jun 30, 2017

we should not mess with the ssh-things - in that case it seems to be a bug in sshfs.

Edit: erm - or maybe with our usage - anyways, the action to write things to knownhosts should be handled by ssh or sshfs

@brokenman
Copy link

Yes, as Fulalas pointed out it happens the first time you log in. Before knownhosts has been touched. Afterwards it goes smoothly. I don't experience this problem (sftp) in other file managers such as Thunar nor directly in console. Perhaps a permission issue writing to knowhosts.

@tsujan did you test the false assumption or assume it was false?

@tsujan
Copy link
Member

tsujan commented Jun 30, 2017

@brokenman This is what I know for sure: it's 2 years that I use ftps with LXQt and I always use pcmanfm-qt for that -- nothing else. What had happened when I used KDE before LXQt, I don't know. I can only vaguely remember -- and don't count on what I'm going to tell -- that I might had encountered a similar issue with Dolphin (before coming to LXQt) and fixed the problem with an ssh -X ... once for all.

By "false assumption" I meant this weird statement by @fulalas: "If you're not seeing that first dialog in my first post, you're probably doing the first login outside pcmanfm-qt...". The present continuous tense of this sentence is everything but a "nice assumption".

@tsujan
Copy link
Member

tsujan commented Jun 30, 2017

Oh, and I correctly quoted it 7 hours ago to prevent any misunderstanding.

@tsimonq2
Copy link
Member

@fulalas First of all, thanks for trying Lubuntu Next Alpha and reporting this bug here. :)

I can't actually reproduce this by simply connecting to my VPS, as it works fine in pcmanfm-qt. But when I remove my VPS from my .ssh/known_hosts file, it tries to connect via SFTP. I honestly think that is a bug in our implementation of this. When it tries to connect over SFTP, there is no dialog box that opens up asking me for my username and password, and SFTP is not even installed on my VPS either.

Even after removing my VPS from .ssh/known_hosts and then connecting to it via the terminal (using the ssh command, which adds my VPS back to .ssh/known_hosts), it still tries to connect via SFTP.

This is in fact a bug on several levels, because even if the SSH option is intended to connect using SFTP, it's poor UI design to tell the user that they are connecting via SSH.

For the sake of pinpointing the exact version here (for bug reproducibility purposes), I am (and so is @fulalas if his system is up-to-date) is using the same exact pcmanfm-qt package as Debian is:

$ apt-cache policy pcmanfm-qt
pcmanfm-qt:
  Installed: 0.11.3-2
  Candidate: 0.11.3-2
  Version table:
 *** 0.11.3-2 500
        500 http://us.archive.ubuntu.com/ubuntu artful/universe amd64 Packages
        100 /var/lib/dpkg/status

Thanks!

@fulalas
Copy link
Author

fulalas commented Jul 1, 2017

@vc-01, thanks for your quick and useful help. Open source community misses people like you, really. :)

@tsimonq2, we can discuss Lubuntu Next issues somewhere else, I think. I have a few suggestions/bug reports that may help you. Do you know a place where I can post them? Thanks!

@tsimonq2
Copy link
Member

tsimonq2 commented Jul 1, 2017

@fulalas Sure, if you want to either file a bug against the Lubuntu Next project on Launchpad or send me an email, that would be great.

Thanks!

@vc-01
Copy link

vc-01 commented Jul 3, 2017

To clarify (for reviewers) the proposed patch.

Gtk offers GtkMountOperation for GIO operations. MountOperationPasswordDialog::done is a kind of Qt implementation of GtkMountOperation:pw_dialog_got_response and MountOperationQuestionDialog::done can follow then GtkMountOperation:question_dialog_button_clicked.

@fulalas
Copy link
Author

fulalas commented Jul 4, 2017

@vc-01, thank you very much for this patch! It's working fine :)

Just a couple of trivial suggestions:
1- If it's not possible to login anonymously, what you think about enabling user radio button?
2- And then putting focus on user line edit (if user name is not needed, put a focus on password line edit)?

Something like this:

    QTimer::singleShot(0,ui->username,SLOT(setFocus()));

    if(canAnonymous) {
        // select ananymous by default if applicable.
        ui->Anonymous->setChecked(true);
    }
    else {
        ui->Anonymous->setEnabled(false);
        ui->asUser->setChecked(true);
    }
    if(!needUserName) {
        ui->username->setEnabled(false);
        QTimer::singleShot(0,ui->password,SLOT(setFocus()));
    }

By doing this user doesn't need to do anything, except typing the useful information.

@vc-01
Copy link

vc-01 commented Jul 23, 2017

@fulalas Yes, I agree with you on this UI improvement, I was keeping myself from doing any UI changes for now. But I think this will be agreed because it's a straightforward UI improvement.

Maybe I will make a PR if I find some time during the week.

@vc-01
Copy link

vc-01 commented Sep 21, 2017

All solved and merged, this can be closed I think.

@palinek
Copy link
Contributor

palinek commented Sep 21, 2017

All solved and merged, this can be closed I think.

@fulalas ?

@palinek palinek closed this as completed Oct 24, 2017
@agaida agaida added this to test in Issues Aug 11, 2018
@agaida agaida added this to Done in Issues Nov 26, 2018
@LindyBalboa
Copy link

I am running into this issue using SSHDroid and Arch Linux. Connecting via terminal works ssh ssh://root@192.168.178.83:2222.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Issues
  
Translations and L10N
Issues
  
Done
Development

No branches or pull requests

8 participants