<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: logname command do not remotely via ssh in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/logname-command-do-not-remotely-via-ssh/m-p/4609678#M40317</link>
    <description>it works, but return me a "connection closed"</description>
    <pubDate>Sun, 11 Apr 2010 11:05:07 GMT</pubDate>
    <dc:creator>skt_skt</dc:creator>
    <dc:date>2010-04-11T11:05:07Z</dc:date>
    <item>
      <title>logname command do not remotely via ssh</title>
      <link>https://community.hpe.com/t5/operating-system-linux/logname-command-do-not-remotely-via-ssh/m-p/4609675#M40314</link>
      <description># ssh hostname who&lt;BR /&gt;/usr/bin/logname: no login name&lt;BR /&gt;xxxxx  pts/3        Mar 29 07:08 &lt;BR /&gt;&lt;BR /&gt;# ssh hostname logname&lt;BR /&gt;/usr/bin/logname: no login name&lt;BR /&gt;logname: no login name&lt;BR /&gt;# echo $?&lt;BR /&gt;1&lt;BR /&gt;&lt;BR /&gt;any one seen/experienced a similar situation?Not sure why logname is failing. Both source and target are RHEL AS U4</description>
      <pubDate>Tue, 30 Mar 2010 13:14:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/logname-command-do-not-remotely-via-ssh/m-p/4609675#M40314</guid>
      <dc:creator>skt_skt</dc:creator>
      <dc:date>2010-03-30T13:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: logname command do not remotely via ssh</title>
      <link>https://community.hpe.com/t5/operating-system-linux/logname-command-do-not-remotely-via-ssh/m-p/4609676#M40315</link>
      <description>Shalom Santhosh,&lt;BR /&gt;&lt;BR /&gt;Check to see that the user exists on both systems and has the same mumeric id in /etc/passwd .&lt;BR /&gt;&lt;BR /&gt;The message seems to indicate the login name does not exist on the target system.&lt;BR /&gt;&lt;BR /&gt;Try:&lt;BR /&gt;whoami&lt;BR /&gt;who am i&lt;BR /&gt;&lt;BR /&gt;enclose multiple command line parameters in double quotes&lt;BR /&gt;&lt;BR /&gt;try ssh username@servername &lt;COMMMAND&gt;&lt;BR /&gt;&lt;BR /&gt;SEP&lt;/COMMMAND&gt;</description>
      <pubDate>Tue, 30 Mar 2010 17:08:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/logname-command-do-not-remotely-via-ssh/m-p/4609676#M40315</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2010-03-30T17:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: logname command do not remotely via ssh</title>
      <link>https://community.hpe.com/t5/operating-system-linux/logname-command-do-not-remotely-via-ssh/m-p/4609677#M40316</link>
      <description>When you run SSH with a remote command, SSH assumes the remote session will be non-interactive and will allocate no pseudo-TTY at the remote end. This may confuse tools like "logname", if they expect the session to have a TTY.&lt;BR /&gt;&lt;BR /&gt;Use the "-t" option with SSH to make it allocate a pseudo-TTY even with non-interactive sessions. For example:&lt;BR /&gt;&lt;BR /&gt;ssh -t hostname logname&lt;BR /&gt;&lt;BR /&gt;I made a quick test and "ssh -t" seems to fix the problem.&lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Tue, 30 Mar 2010 20:59:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/logname-command-do-not-remotely-via-ssh/m-p/4609677#M40316</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2010-03-30T20:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: logname command do not remotely via ssh</title>
      <link>https://community.hpe.com/t5/operating-system-linux/logname-command-do-not-remotely-via-ssh/m-p/4609678#M40317</link>
      <description>it works, but return me a "connection closed"</description>
      <pubDate>Sun, 11 Apr 2010 11:05:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/logname-command-do-not-remotely-via-ssh/m-p/4609678#M40317</guid>
      <dc:creator>skt_skt</dc:creator>
      <dc:date>2010-04-11T11:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: logname command do not remotely via ssh</title>
      <link>https://community.hpe.com/t5/operating-system-linux/logname-command-do-not-remotely-via-ssh/m-p/4609679#M40318</link>
      <description>&amp;gt; it works, but return me a "connection closed"&lt;BR /&gt;&lt;BR /&gt;The "connection closed" message probably comes from your SSH client.&lt;BR /&gt;&lt;BR /&gt;Perhaps the "logname" command at the target server outputs the correct answer, but without the LF character at the end? Then the "connection closed" message from the SSH client might overwrite the answer on your screen.&lt;BR /&gt;&lt;BR /&gt;Or perhaps the end of the "logname" process at the target end triggers the tear-down of the connection, without making sure that all the data in various outgoing buffers has been transmitted? (This might be a SSH bug.) &lt;BR /&gt;&lt;BR /&gt;I think I saw such behaviour once somewhere.&lt;BR /&gt;&lt;BR /&gt;Please try these commands:&lt;BR /&gt;&lt;BR /&gt;ssh -t hostname "logname; echo"&lt;BR /&gt;&lt;BR /&gt;ssh -t hostname "logname; sleep 1"&lt;BR /&gt;&lt;BR /&gt;One or both of these should fix the problem, no matter the cause.&lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Mon, 12 Apr 2010 10:55:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/logname-command-do-not-remotely-via-ssh/m-p/4609679#M40318</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2010-04-12T10:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: logname command do not remotely via ssh</title>
      <link>https://community.hpe.com/t5/operating-system-linux/logname-command-do-not-remotely-via-ssh/m-p/4609680#M40319</link>
      <description>both did not fix&lt;BR /&gt;"&lt;BR /&gt;root&lt;BR /&gt;&lt;BR /&gt;Connection to hostname closed.&lt;BR /&gt;&lt;BR /&gt;"</description>
      <pubDate>Tue, 13 Apr 2010 12:18:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/logname-command-do-not-remotely-via-ssh/m-p/4609680#M40319</guid>
      <dc:creator>skt_skt</dc:creator>
      <dc:date>2010-04-13T12:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: logname command do not remotely via ssh</title>
      <link>https://community.hpe.com/t5/operating-system-linux/logname-command-do-not-remotely-via-ssh/m-p/4609681#M40320</link>
      <description>I think I misunderstood your problem: you want the command to return _only_ the output of the remote /usr/bin/logname and nothing else, right?&lt;BR /&gt;&lt;BR /&gt;In that case, you'll need to add the -q option to ssh:&lt;BR /&gt;&lt;BR /&gt;ssh -qt hostname logname&lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Tue, 13 Apr 2010 12:40:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/logname-command-do-not-remotely-via-ssh/m-p/4609681#M40320</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2010-04-13T12:40:56Z</dc:date>
    </item>
  </channel>
</rss>

