Using Putty for Freenas

Status
Not open for further replies.

Pmaster

Dabbler
Joined
Oct 7, 2013
Messages
16
Hi,

I'm trying to use Putty and SSH to connect to my Freenas 9.1.0.
Every time I try to connect to my internal IP-adres it gives me the next error:

Disconnected : No supported authentication methods available ( server sent: publickey ).

Well, I'm a total noob to this so can you guys please help me with this?

Kind regards,
Pmaster
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
Did you configure ssh service on freenas to allow password authentication?
 

Pmaster

Dabbler
Joined
Oct 7, 2013
Messages
16
Do you mean the box with says: Password Authentication Allowed? Yes, this one is checked..

I'm sorry.. this works. But now I receive the following message after putting in my password:
Access denied.
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
Whatever user you're trying to log on as, make sure password login is not disabled for it.
You can check this in Account -> Users page in the web GUI. Make sure "Disable password login" and "Lock user" columns are set to "false".
 

Pmaster

Dabbler
Joined
Oct 7, 2013
Messages
16
Well.. For some reason I didn't use the right account. I tried several times to login with an Admin account which wasn't even created.
Now I can login with a user. But don't use an public/private key? Is it OK ( for security reason ) this way?
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
If it's just for home network, it's fine really.
I would only concern myself with the hassle of using key-based authentication if you plan to open the SSH server to the Internet (world).
 

warri

Guru
Joined
Jun 6, 2011
Messages
1,193
The default "admin" user is just working for the GUI, it is not a system account. You need to allow root login or create a user account with access to the shell.

I agree with Whattteva, just use password based authentication if SSH is not exposed to the internet.
 

Pmaster

Dabbler
Joined
Oct 7, 2013
Messages
16
Thanks, but the goal is that I can access files on my Freenas from my work. Still password authentication enough?
Yep I created an account with root access.
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
In that case, then you may want to go with key-based auth.
PuTTY has a built-in keygen tool you could use called PuTTYgen.

Still, you may have other problems since you said you're accessing this from work.
Your work probably has a restrictive corporate network, which will block your traffic.
It probably also has a policy against you doing this, so do so at your own risk.
Just know that we are not to be held responsible if you get fired. :confused:
 

warri

Guru
Joined
Jun 6, 2011
Messages
1,193
If you want to access your box with root from remote locations, I would setup the public key authentication. This is rather easy, just paste the public ssh key of the user in the appropriate field in the GUI (see http://doc.freenas.org/index.php/Users). remember to disallow password logins then.

Also use a non-standard port (not 22). You usually can configure your router to do the forwarding.
 

Pmaster

Dabbler
Joined
Oct 7, 2013
Messages
16
Where can I find this keygen in Putty? Meanwhile I downloaded this tool.

I generated a key, copied this long key to the appropriate field in the GUI and disabled the password login.
When I now try to connect via Putty it still needs an username and password?

Configuring another port is just for security reasons I guess.
 

warri

Guru
Joined
Jun 6, 2011
Messages
1,193
There is a download link to PuTTYgen on the official putty website. WinSCP offers a small tutorial for PuTTYgen. Have you restarted SSH after changing the settings?

Yes, changing the port is just for some additional security, so that you don't get hundreds of automated login attempts daily.

EDIT: Also you need to enter your username even though you use public key authentication. The password part should be replaced by the key authentication, where you might have to enter your private key's encryption password.
 

Pmaster

Dabbler
Joined
Oct 7, 2013
Messages
16
Nope.. I'm still struggling with this.

What I have done:

Generated a public key with Putty KeyGen
Set up comment and a passphrase
Save the public key to my Desktop
And then I'm stuck.. this is even harder then I thought it was?
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
Nope.. I'm still struggling with this.

What I have done:

Generated a public key with Putty KeyGen
Set up comment and a passphrase
Save the public key to my Desktop
And then I'm stuck.. this is even harder then I thought it was?
With putty you need to go into the options for your connection, authentication, and point it to your generated key. Otherwise it doesn't know you need to load a key at all.
 

SmallGuy

Guru
Joined
Jun 7, 2013
Messages
560
Status
Not open for further replies.
Top