分页: 1 / 1

远程登录后安装软件

发表于 : 2011-05-11 16:28
罗非鱼
我想通过ssh远程登录计算机后,在那台机器上安装一个程序。
下面的命令,为何不对?
ssh [email protected] sudo apt-get install mplayer
[email protected]'s password:
sudo: no tty present and no askpass program specified

Re: 远程登录后安装软件

发表于 : 2011-05-11 16:33
罗非鱼
ssh [email protected] sudo apt-get install mplayer
[email protected]'s password:
sudo: no tty present and no askpass program specified
how to revise my command
ssh [email protected] sudo apt-get install mplayer?

Re: 远程登录后安装软件

发表于 : 2011-05-11 16:39
罗非鱼
为何分成两步就可以
ssh [email protected]
[email protected]'s password:
Linux pt 2.6.35-28-generic #50-Ubuntu SMP Fri Mar 18 19:00:26 UTC 2011 i686 GNU/Linux
Ubuntu 10.10
Welcome to Ubuntu!
* Documentation: https://help.ubuntu.com/
New release 'natty' available.
Run 'do-release-upgrade' to upgrade to it.
Last login: Tue May 10 11:50:10 2011 from pengtao-x51l.local
pt@pt:~$ sudo apt-get install mplayer
[sudo] password for pt:
Reading package lists... Done
Building dependency tree

可以写成一句话吗?

Re: 远程登录后安装软件

发表于 : 2011-05-11 16:47
eexpress
2个环境。

Re: 远程登录后安装软件

发表于 : 2011-05-11 21:20
lilydjwg
不开终端就没有 tty,没有 tty 你又不给 sudo -s 参数 sudo 就不知道从哪里读密码,就这样。

Re: 远程登录后安装软件

发表于 : 2011-05-12 10:10
MaskRay
用 sudo -S