From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrey Tykhonov Subject: Re: Connect to the ssh and execute any command Date: Mon, 16 Sep 2013 20:44:53 +0300 Message-ID: <20130916174453.GA8446@demi> References: <20130912215641.GA6461@demi> <87y571p6dt.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47291) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLcs0-00068u-Vf for emacs-orgmode@gnu.org; Mon, 16 Sep 2013 13:46:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VLcrv-0004rx-KF for emacs-orgmode@gnu.org; Mon, 16 Sep 2013 13:45:56 -0400 Content-Disposition: inline In-Reply-To: <87y571p6dt.fsf@gmx.de> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Michael Albinus Cc: tramp-devel@gnu.org, emacs-orgmode@gnu.org On Fri, Sep 13, 2013 at 08:45:02AM +0200, Michael Albinus wrote: > Andrey Tykhonov writes: > > [Cc to tramp-devel@gnu.org, because I want to help with Tramp config] > > > Hi all! > > Hi Andrey, > > > During last several days I was trying to implement quite simple script > > which: > > > > 1. Creates new buffer with the shell (M-x shell) > > 2. Executes there "ssh username@domain.com". As result -- the password > > prompt appears in the minibuffer. I manually input password. > > 3. Then script executes any command in the recently created buffer > > (shell), for example: "ls -la". So I expect to see directory listing on > > the domain.com. > > > > but, for sorry, I cannot to do so that "ls -la" will be executed! > > > > I googled, I have tried many different approaches but without any luck :-( > > > > Here I should mention quite important thing: I cannot use TRAMP because > > it does not work with the server to which the script connects and then > > on which executes "ls -la". (I suppose that TRAMP uses FUSE, but for > > sorry FUSE does not work with mine server). So TRAMP is not available > > for me. > > Tramp does not use FUSE for ssh connections. Please show an example > connection to the remote host, and how it fails. First of all I added (setq tramp-verbose 6) to the ~/.emacs Then M-x eshell, and then cd /ssh:username@hostname:/some/existing/dir I get password prompt, I put correct password, then get such prompt: /ssh:username@hostname:/some/existing/dir $ Here I try to "ls -la" and get the following error: Couldn't find a POSIX `id' command Best regards, Andrey. > > Prior to the test, you should apply > > (setq tramp-verbose 6) > > This will create a Tramp debug buffer, which shall show the problem. > > > Regards, > > Andrey > > Best regards, Michael.