Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-06-2011, 08:42 AM   #1
Registered: Oct 2006
Location: The Ether
Distribution: Lubuntu 14.04 LTS, Kali
Posts: 297

Rep: Reputation: 30
SSH and how to stop password being shown in clear text

I have a headless server running Centos and I often login in remotely to administer it. I have passwordless login and sometimes run commands remotely via ssh from a client machine. I've tried to shut the server remotely but have come across a small problem. Here is the output of the command I use to shutdown :

unclec@linux-desktop $ ssh centos 'sudo /sbin/shutdown -h now '
As passwordless login is set up I do not need to enter a password to ssh BUT as I am running sudo on the server I am asked to enter my centos unclec password and this is shown in clear text on my local machine terminal. Is there a way to prevent this or should I edit the sudoers file on centos so it does not ask me to enter the password when "sudoing" ?

Old 01-06-2011, 08:59 AM   #2
Senior Member
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 614Reputation: 614Reputation: 614Reputation: 614Reputation: 614Reputation: 614
Force psuedo-tty allocation with ssh's "-t" option
ssh -t centos 'sudo /sbin/shutdown -h now '
1 members found this post helpful.


clear text, password, remote, ssh

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] SSH and clear text passwords mattydee Slackware 12 08-22-2012 10:01 AM
ssh password from a text file ikinnu Linux - Security 11 02-16-2011 11:49 AM
.htaccess and clear-text password noir911 Linux - Server 1 05-12-2008 12:55 PM
can't stop service name shown by nmap mrpc_cambodia Red Hat 1 11-15-2004 07:52 AM
If you use secure IMAP, does your password go clear text? cryptosporidium Linux - Security 1 03-25-2004 02:11 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:38 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration