Page 1 of 1

SOLVED:SFTP sharing

Posted: Sun Feb 28, 2016 3:31 am
by Georgia boy
My issue is this. Before I installed Mint XFCE 17.3 on the laptop I was able to go from desktop to laptop and vice-versa with the simple SFTP. Now I can do from laptop to desktop but not other way around. I'll get an error about begin denied. Been a while since trying and can't remember exact warning. Think that the firewall might be giving an issue maybe. Not sure. But like I said, can go to the desktop and get what I want and send to desktop. But still would be nice to know why I'm not able to now get here from there. I'm running Debian Testing on desktop.

Re: Simple file sharing is NOT simple

Posted: Sun Feb 28, 2016 9:26 am
by altair4
Georgia boy wrote:My issue is this. Before I installed Mint XFCE 17.3 on the laptop I was able to go from desktop to laptop and vice-versa with the simple SFTP. Now I can do from laptop to desktop but not other way around. I'll get an error about begin denied. Been a while since trying and can't remember exact warning. Think that the firewall might be giving an issue maybe. Not sure. But like I said, can go to the desktop and get what I want and send to desktop. But still would be nice to know why I'm not able to now get here from there. I'm running Debian Testing on desktop.
You might consider that you have the wrong ... well .. it's the old ... ssh-key at /home/your-user-name/.ssh/known_hosts on the desktop. It's pointing to the old OS on the laptop not the new one.

Re: SFTP sharing

Posted: Sun Feb 28, 2016 1:20 pm
by Georgia boy
Go to the one on desktop and delete the key. Then do ssh <user name on target box>@<xxx.xxx.x.xxx> to get a new one when signing in right? will it go through to Mint on laptop or will have to do anything to firewall on mint? Know that firewall is disabled on Debian by default.

Re: SFTP sharing

Posted: Sun Feb 28, 2016 1:28 pm
by altair4
Right. You can delete the key directly in known_hosts.

Don't use a firewall on Linux since they are all behind my router on my lan but you can disable it with a:

Code: Select all

sudo ufw disable

Re: SFTP sharing

Posted: Sun Feb 28, 2016 1:37 pm
by Georgia boy
Same here with the router bit but for some reason thought that I read Mint setups automatically. If not then shouldn't be any issue. Did like how it automatically did the sftp over to desktop. I didn't even do the ssh at first. Just popped in the sftp in the thunar and connected right up. Got so used to popping over to the laptop from desktop it didn't dawn about the keyring being different. Sometime will need to play with the TB encryption. Have setup on the desktop but need to do one from laptop also But that's another day.

Re: SFTP sharing

Posted: Sun Feb 28, 2016 5:11 pm
by Georgia boy
Disabled ufw on mint. Still getting this error.
Was going to show but keep getting too big to add. Any rate message is this:

Failed to open "File System".
Connection refused by server.

UFW disabled.

Tried ssh://abcde@111.111.1.111 and sftp://abcde@xxx.xxx.x.xxx both same results. I did the deletion of the key for other in the .ssh host file.
What do I need for getting the new keyring?


Crap!!! now getting denied from the laptop to the desktop also. The message from the laptop is saying Failed to open "File System". Permission denied. ???

Disregard the laptop not going to desktop. That works now. Was typo. But still unable to get desktop to laptop.

Re: SFTP sharing

Posted: Sun Feb 28, 2016 6:49 pm
by altair4
I'm getting lost on who is connecting to who here. AN this forum will not allow me to post my entire response so this will be done in pieces,

*** Make sure ssh is installed:

Code: Select all

sudo apt-get install ssh
** If you are connecting by ip address verify that it is the correct ip address.

** If you get a keying issue from the client to the sever remove the key. For example if 192.168.0.100 is the ip address of the server:

Code: Select all

ssh-keygen -R 192.168.0.100
If it found the key it will tell you so:
altair@vmint173xfce ~ $ ssh-keygen -R 192.168.0.100
# Host 192.168.0.100 found: line 1 type ECDSA
/home/altair/.ssh/known_hosts updated.
Original contents retained as /home/altair/.ssh/known_hosts.old

Re: SFTP sharing

Posted: Sun Feb 28, 2016 6:53 pm
by altair4
Then try to connect again:
altair@vmint173xfce ~ $ ssh altair@192.168.0.100
I'd like to post what the response to that line looks like but this forum refuses to allow that to happen.

Re: SFTP sharing

Posted: Sun Feb 28, 2016 11:04 pm
by Georgia boy
Sorry for the confusion. I got confused myself in this mess. But it's the desktop not connecting to the laptop since the installation of LM XFCE 17.3 when I replaced Debian Wheezy on the laptop.


titlickmcgee@Titlick:~$ ssh-keygen -R 192.168.0.100
/home/titlickmcgee/.ssh/known_hosts:1: invalid line
/home/titlickmcgee/.ssh/known_hosts is not a valid known_hosts file.
Not replacing existing known_hosts file because of errors
titlickmcgee@Titlick:~$

Re: SFTP sharing

Posted: Sun Feb 28, 2016 11:20 pm
by Georgia boy
And the odd thing of it is I had no issues of either machine contacting each other at all before the replacement of Wheezy on the laptop. Noticed at the beginning I was able to go to the desktop but not the other way. Thought it odd at the time but had a lot of other things to sort out in setting this up. And yes, I had been swapping things out before the replacement because at time I was putting some stuff from one folder on desktop to one on the laptop and all was working fine. Don't know what happened. But is an interesting learning expierence.

Re: SFTP sharing

Posted: Mon Feb 29, 2016 8:12 am
by altair4
Georgia boy wrote:Sorry for the confusion. I got confused myself in this mess. But it's the desktop not connecting to the laptop since the installation of LM XFCE 17.3 when I replaced Debian Wheezy on the laptop.


titlickmcgee@Titlick:~$ ssh-keygen -R 192.168.0.100
/home/titlickmcgee/.ssh/known_hosts:1: invalid line
/home/titlickmcgee/.ssh/known_hosts is not a valid known_hosts file.
Not replacing existing known_hosts file because of errors
titlickmcgee@Titlick:~$
Time to do a reset:

Rename the known_hosts file:

Code: Select all

mv /home/titlickmcgee/.ssh/known_hosts /home/titlickmcgee/.ssh/known_hosts.orig
When you run ssh again it will recreate the known_hosts file.

Re: SFTP sharing

Posted: Mon Feb 29, 2016 9:19 am
by Georgia boy
For some reason that didn't work.

Re: SFTP sharing

Posted: Mon Feb 29, 2016 9:30 am
by altair4
what didn't work?

You couldn't rename the file or it didn't recreate the file when you ran ssh again?

Re: SFTP sharing

Posted: Mon Feb 29, 2016 10:13 am
by Georgia boy
I rand the code you listed. Then turned on the laptop and did the ssh. kept getting the same error. Go back into .ssh folder and the host file is empty still.
I didn't see where the original had been renamed either when going into that folder.

Re: SFTP sharing

Posted: Mon Feb 29, 2016 11:13 am
by altair4
It looks like I can't help you. SSH is fairly easy to set up in Linux so the only guess I have at this point is:

** You don't have ssh installed
** There is no such host with 192.168.0.100 as it's ip address.
** There is a host with that ip address but it's in a different subnet.
** You aren't titlickmcgee

Re: SFTP sharing

Posted: Mon Feb 29, 2016 11:29 pm
by Georgia boy
altair4 wrote:It looks like I can't help you. SSH is fairly easy to set up in Linux so the only guess I have at this point is:

** You don't have ssh installed
** There is no such host with 192.168.0.100 as it's ip address.
** There is a host with that ip address but it's in a different subnet.
** You aren't titlickmcgee
1. ssh is installed on the desktop.
2 I made that one up not showing my real IP on the laptop
3. Refer to 2
4. Want to bet? :D

You should see some of the other names I use when installing. :wink:

Another person and I was talking about this at work and he made a comment that maybe the firewall had closed one of the ports that ssh uses. Told theindividual I had disabled the ufw but the individual thinks that maybe should enable firewall again verify and open if closed and then disable firewall again.
I'm thinking it has to do with Mint's installation. Reason behind that is that before the installation it was working fine going back and forth. Now it only works on going to the desktop and not back to the laptop. With that error each time on going to Mint it sounds more and more like Mint's blocking the ssh from coming in.

Re: SFTP sharing

Posted: Tue Mar 01, 2016 12:07 am
by Georgia boy
Thanks everyone. I'm in now. Last frigging time I'll ever believe what Synaptic tells me. Decided to try one more time. Opened Root Terminal and did this:

Code:
apt-get install openssh-server
Code:
Sucker flew like a bat out of hell installing. WHAT???? Freaking Synaptic showed all of that installed and I fell for it. Last time I'll do that crap. Will use terminal instead for verifying instead of that.

Sorry for the pain but was a good learning experience at same time. And that is what Linux is all about. Learning. Should see the bookmarks and pdfs' that I'm constantly getting into. Just that I fell for the Synaptic saying all was installed.

Again thanks for bearing with me. And Yes I do have some very odd install names. :wink: