Share your knowledge at the LQ Wiki.
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, 09:42 AM   #1
Registered: Oct 2006
Location: The Ether
Distribution: Fedora 14, Ubuntu , Slax 5.1.8, OpenSolaris, Centos 4.8
Posts: 296

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, 09:59 AM   #2
Senior Member
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,701

Rep: Reputation: 566Reputation: 566Reputation: 566Reputation: 566Reputation: 566Reputation: 566
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 11:01 AM
ssh password from a text file ikinnu Linux - Security 11 02-16-2011 12:49 PM
.htaccess and clear-text password noir911 Linux - Server 1 05-12-2008 01:55 PM
can't stop service name shown by nmap mrpc_cambodia Red Hat 1 11-15-2004 08:52 AM
If you use secure IMAP, does your password go clear text? cryptosporidium Linux - Security 1 03-25-2004 03:11 AM

All times are GMT -5. The time now is 06:56 PM.

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