我想通过ssh远程登录计算机后,在那台机器上安装一个程序。
下面的命令,为何不对?
ssh pt@192.168.1.101 sudo apt-get install mplayer
pt@192.168.1.101's password:
sudo: no tty present and no askpass program specified
远程登录后安装软件
-
- 帖子: 980
- 注册时间: 2008-04-12 12:44
Re: 远程登录后安装软件
ssh pt@192.168.1.101 sudo apt-get install mplayer
pt@192.168.1.101's password:
sudo: no tty present and no askpass program specified
how to revise my command
ssh pt@192.168.1.101 sudo apt-get install mplayer?
pt@192.168.1.101's password:
sudo: no tty present and no askpass program specified
how to revise my command
ssh pt@192.168.1.101 sudo apt-get install mplayer?
-
- 帖子: 980
- 注册时间: 2008-04-12 12:44
Re: 远程登录后安装软件
为何分成两步就可以
ssh pt@192.168.1.101
pt@192.168.1.101'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
可以写成一句话吗?
ssh pt@192.168.1.101
pt@192.168.1.101'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
可以写成一句话吗?
- eexpress
- 帖子: 58428
- 注册时间: 2005-08-14 21:55
- 来自: 长沙
- lilydjwg
- 论坛版主
- 帖子: 4249
- 注册时间: 2009-04-11 23:46
- 系统: Arch Linux
- 联系:
Re: 远程登录后安装软件
不开终端就没有 tty,没有 tty 你又不给 sudo -s 参数 sudo 就不知道从哪里读密码,就这样。
-
- 帖子: 61
- 注册时间: 2010-04-29 22:00
- 系统: Gentoo Linux ~amd64
- 联系: