SOLVED When Accessing Server via SFTP I See Random Files

Status
Not open for further replies.

aedan929

Dabbler
Joined
Jul 5, 2016
Messages
27
I followed the instructions on this page:
http://www.makeuseof.com/tag/set-freenas-server-access-files/#comment-form
When I access my server via SFTP I see these files:
Screenshot_2016-07-19-09-55-17.png

This is when I access it over my home network via the servers ip, I want to see these files not the ones above:
Screenshot (46).png

Thanks in advance!
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Right. SFTP exposes the entire filesystem of your server. In your SFTP session, double-click on "/mnt" then navigate to your share. If you want to prevent users from accessing directories outside of a small part of your filesystem, you will have to set up an SFTP chroot.
 

aedan929

Dabbler
Joined
Jul 5, 2016
Messages
27
Right. SFTP exposes the entire filesystem of your server. In your SFTP session, double-click on "/mnt" then navigate to your share. If you want to prevent users from accessing directories outside of a small part of your filesystem, you will have to set up an SFTP chroot.
Ok thanks! It's just me and a couple of friends no need to prevent users in this server. LOL just realized how much my location is exposed, fixed it!
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
If you do what's suggested in this "makeuseof" post, you'll be sorry.

If you expose port 22, you will be incessantly pounded by the Russians and Chinese.

A good rule of thumb for less experienced users: Don't do anything with your FreeNAS that you heard about on the internet, unless you heard it from the FreeNAS community directly.
 

aedan929

Dabbler
Joined
Jul 5, 2016
Messages
27
If you do what's suggested in this "makeuseof" post, you'll be sorry.

If you expose port 22, you will be incessantly pounded by the Russians and Chinese.

A good rule of thumb for less experienced users: Don't do anything with your FreeNAS that you heard about on the internet, unless you heard it from the FreeNAS community directly.
Ok, would it help if I disabled SSH when I'm at home and can access it with the server's ip, and enable it when I'm on vacation and need to add videos to it?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Ok, would it help if I disabled SSH when I'm at home and can access it with the server's ip, and enable it when I'm on vacation and need to add videos to it?
The best solution is to set up and configure a VPN. Second best - force ssh to use public-key authentication (uncheck the box "Allow Password Authentication" under Services -> SSH in the webgui).
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
The best solution is to set up and configure a VPN. Second best - force ssh to use public-key authentication (uncheck the box "Allow Password Authentication" under Services -> SSH in the webgui).

And change the port to not be on port 22. ;)
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
I have no problem using ssh in this fashion, just as Cyberjock says, CHANGE THE PORT to something high numbered. The zip code of your grandma's house is usually a good choice. You don't have to do all the VPN stuff really if it's not in your wheelhouse.

0) Not Acceptable: SSH on port 22 with passwords
1) Acceptable (barely): SSH on a high numbered port with passwords
2) Good: SSH on a high numbered port with passwords disabled, and certificates only
3) Best: A proper VPN solution
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
I have no problem using ssh in this fashion, just as Cyberjock says, CHANGE THE PORT to something high numbered. The zip code of your grandma's house is usually a good choice. You don't have to do all the VPN stuff really if it's not in your wheelhouse.

0) Not Acceptable: SSH on port 22 with passwords
1) Acceptable (barely): SSH on a high numbered port with passwords
2) Good: SSH on a high numbered port with passwords disabled, and certificates only
3) Best: A proper VPN solution
I prefer to put SSH on 443, 80, or 53 so that I can get around annoying egress filtering.
 
Status
Not open for further replies.
Top