Cannot shutdown FreeNAS PC from Windows PC via SSH as normal user

Status
Not open for further replies.

Deepak Agarwal

Explorer
Joined
Dec 6, 2013
Messages
61
Hi Cyberjock


Mate, I wasn't toying with what works! I will still be doing what you suggested with the exception that I would be changing the sudoers file that resides in '/conf/base/etc/local/' folder using vi.

This is based on what Dusan said - using visudo will not change the file that I need to change to make my changes to the sudoers file persistent after reboot! That was all! I don't know any better and I am being guided by people of the likes of you, Dusan and others!


P.S. Its all working now - the sudoers files retains my changes - all good! Thanks again to all of you who helped me get this far.

One more issue - I have been able to connect from my Windows 7 PC using PuTTY with password authentication, not public key authentication. No problems. However, I was now trying to connect using Plink. I have copied the plink.exe file in the C:\Program Files (x86)\Plink folder, added this path to the environment variable but am not able to connect from the dos command prompt :- it comes up with an error saying fatal error, connection refused.

The command given was :-

plink -v -ssh anyone@192.168.1.3


Is there something wrong that I am doing here?

I am able to connect to the FreeNAS box using PuTTY though through my saved session.



Best regards


Deepak
 

Neil Whitworth

Dabbler
Joined
Nov 14, 2013
Messages
30
One more issue - I have been able to connect from my Windows 7 PC using PuTTY with password authentication, not public key authentication. No problems. However, I was now trying to connect using Plink. I have copied the plink.exe file in the C:\Program Files (x86)\Plink folder, added this path to the environment variable but am not able to connect from the dos command prompt :- it comes up with an error saying fatal error, connection refused.

The command given was :-

plink -v -ssh anyone@192.168.1.3

you do not need -v or -ssh. You should be able to use
Code:
plink anyone@192.168.1.3 sudo shutdown -r now


I am able to connect to the FreeNAS box using PuTTY though through my saved session.

plink can use saved putty sessions (including key based auth if set up)

Code:
plink <putty-session-name> sudo shutdown -r now
 

Deepak Agarwal

Explorer
Joined
Dec 6, 2013
Messages
61
Hi Neil


I will try that out tonight when I get home.

Does the command need to be given as a part of the

plink...

statement, is it?

What I was doing was first trying to just connect to see if I am able to connect to the FreeNAS box if the first place and then issue the command, if I was able to successfully connect. May I got it wrong!

Hopefully, I am just about there! Thanks once again for your help, mate! Genuinely appreciate it!


Best regards


Deepak
 
Status
Not open for further replies.
Top