[CentOS] scp with tty

m.roth at 5-cent.us m.roth at 5-cent.us
Tue Oct 13 21:15:09 UTC 2009


> Well, I noticed that ssh/scp probably requires tty and when called
> from a script, its not from a tty.
>
> At least in my case which was drupal calling a script that lauched
> ssh, a non tty source.
>
> I also required running privileged commands.
>
> Mebbe you don't need all this so check your logs and see what happens.
>
My last job, I was setting up rsync backups. What I did was create a user,
backup, then in /etc/sudoers, have !requiretty *only* for that user. The
user was also limited in what commands it could run (in that case, rsync
only).

Don't forget to log in as that user first, so that you don't get the "Oh,
This is a new IP, are you Sure you want to continue connecting?!?!"

       mark

> On Oct 13, 2009, at 12:15 PM, Les Mikesell wrote:
>
>> aurfalien at gmail.com wrote:
>>> I actually had to set both ssh keys and commented out the requiretty
>>> in the sudoers file.
>>>
>>> What I was doing was having ssh called from a script and running a
>>> command on that remote host it was ssh-ing into.
>>
>> I'm still missing why you'd need to sudo inside the remote shell
>> instead
>> of ssh'ing as the right user in the first place.  Or at least why
>> you'd
>> require a password for it.
>>
>> --
>>   Les Mikesell
>>    lesmikesell at gmail.com
>> _______________________________________________
>> CentOS mailing list
>> CentOS at centos.org
>> http://lists.centos.org/mailman/listinfo/centos
>
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>





More information about the CentOS mailing list