Linux & proxy settings are always very bothersome to search.
[apt-get] export command or set as a environmental variable
export http_proxy=http://[address]:[port]/
[wget] xport command or set as a environmental variable
export http_proxy=http://[address]:[port]/
[yum] 環xport command or set as a environmental variable
export http_proxy=http://[address]:[port]/
[rpm] use command line options
rpm --httpproxy [address] --httpport [port]
2010年7月18日日曜日
Ubuntu 10.04 sudo via ssh
When you try to send sudo command via ssh, I got this message.
sudo: no tty present and no askpass program specified
There are some entries that says you should comment out "Defaults requiretty" from /etc/sudoers, however, there is no such line in the file for Ubuntu 10.04.
Writing "Defaults visibletty" works fine although you password will be visible when you type.
It didn't sound the best solution and I found out that using "-t" option for ssh command is better way. Then the command will be something like this.
ssh -t [address] sudo shutdown -h now
In addition,
Writing the following like in "/etc/sudoers" will let you "sudo" without prompting password request.
username ALL=NOPASSWD: ALL
sudo: no tty present and no askpass program specified
There are some entries that says you should comment out "Defaults requiretty" from /etc/sudoers, however, there is no such line in the file for Ubuntu 10.04.
Writing "Defaults visibletty" works fine although you password will be visible when you type.
It didn't sound the best solution and I found out that using "-t" option for ssh command is better way. Then the command will be something like this.
ssh -t [address] sudo shutdown -h now
In addition,
Writing the following like in "/etc/sudoers" will let you "sudo" without prompting password request.
username ALL=NOPASSWD: ALL
登録:
投稿 (Atom)