Acessing over the Internet

Status
Not open for further replies.
Joined
Jan 25, 2017
Messages
5
Hi, Ive been looking into trying to access my server over the interwebs and have stumbled into a rut. i asked the guy who's forum i followed and he told me i should post here and maybe one of you could figure this out.
Code:
Trents-MacBook-Pro:~ Trent$ ls -laR .ssh

total 24

drwx------   5 Trent  staff   170 Jan 30 00:05 .

drwxr-xr-x@ 33 Trent  staff  1122 Jan 19 17:51 ..

-rw-------   1 Trent  staff  1766 Jan 30 00:02 id_rsa

-rw-r--r--   1 Trent  staff   412 Jan 30 00:02 id_rsa.pub

-rw-r--r--   1 Trent  staff   172 Jan 30 00:05 known_hosts

Trents-MacBook-Pro:~ Trent$

i have created a authentification key and i have put it into the server and i have made sure that it was the public key and not the private key that needs to go into the server. and i have just not had any luck with trying to figure this out.
Thanks
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
Are you following @Glorious1 post?

I followed his post with great success. https://forums.freenas.org/index.ph...r-freenas-server-remotely-and-securely.27376/

Did you manually put the ssh keys in there? You should be able to accomplish this all through the GUI. Try his instructions step by step.

Also if would be helpful if you provided exactly what errors you are getting or where the connection is falling.

Are you trying to access a share through a SSH tunnel? Are you just trying to SSH into your box remotely?
 
Joined
Jan 25, 2017
Messages
5
yes im following @Glorious1 's post and i have followed his guide as well but not had great success. Ive done it both ways and no matter how i did it, it wouldnt allow me to ssh with the key and not the password. im trying to access the box remotely right now but i do plan to be able to access my drives through the Internet
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
Can you provide the specific error it is throwing?

The first step is to get SSH working, if you can get that setup, it is trivial to get access to everything else remotely.
 
Joined
Jan 25, 2017
Messages
5
i have gotten ssh to work on my local network with a password. my issue is coming when i want to ssh into my server with a authentification key then it just does not want to ssh
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
Ok so you are doing this how exactly. Putty? Terminal?

And I assume you are doing this by directly connecting to the IP address? If you are using key based authentication, it should not prompt you for your password except maybe the first time, and then it would ask you for your passphrase to add it to the list of known hosts or something like that (can't recall off the top of my head).

You should have password authentication disabled, key based authentication is what makes SSH secure in the first place.
 
Joined
Jan 25, 2017
Messages
5
on my windows computer im using windows bash but i have a linux laptop that ive been working on to set it up
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
I'm not familiar with Bash on windows, can you download putty and use that. It is what majority of people on here use and it has a relatively simple interface for understanding the necessary information needed to connect. Also makes it easy to generate a key pair.

Going forward, I would also wipe out your previous SSH keys, by creating a new user on your freenas box and then starting from there.
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
Ok instead of a prolonged back and forth this is the best I can put forward. Let's get internal SSH working first before you try remote (as this introduces additional factors).
1) follow this tutorial to generate your keys:
https://support.rackspace.com/how-to/generating-rsa-keys-with-ssh-puttygen/

2) next copy your public key and navigate to FreeNAS GUI and go to Account->Users->select the new user you created and choose "modify user".

3) make sure you have a home directory chosen for the user.

4) make sure "disable password login" is checked

5) paste your public key into the box that says "ssh public key" (the public key should start with ssh-rsa)

6) click ok to save changes

7) make sure SSH service is turned on under "services" tab in GUI

8) go back to putty and connect by following these instructions:
https://forums.freenas.org/index.ph...ows-clients-using-putty-on-freenas-9-3.34893/

now you should be able to ssh to your box through putty by entering the direct "static IP" of your freenas box (your box does have a static IP correct?)

Let me know.
 
Last edited:
Status
Not open for further replies.
Top