ls

Story: Tip: OpenSSH Speed Tips and TricksTotal Replies: 3
Author Content
shmget

Nov 22, 2008
3:29 PM CST
Carla: you said: "... Terry's home directory you must specify ls /home/terry"

actually ssh tery@host2 'ls ~' or ls ~ will do the trick This has nothing to do with ssh and everything to do with escaping things so that the local shell doesn't expand it.
tuxchick

Nov 22, 2008
6:08 PM CST
Mm, nice, I love tasty shortcuts :)
herzeleid

Nov 22, 2008
6:11 PM CST
Actually the '~' is redundant isn't it, in much the same way that the '~' is redundant in the command 'cd ~'

By default ssh/scp use the home directory of the user account.
gus3

Nov 22, 2008
7:04 PM CST
Then ssh(1) is wrong. It states:

"If command is specified, it is executed on the remote host instead of a login shell." (emph. added)

However, running "strace -f" on the SSH server shows that, at some point, the unprivileged child sshd does an execve("/bin/bash", ... ), passing it "-c" and the client-side command in ARGV[].

Posting in this forum is limited to members of the group: [ForumMods, SITEADMINS, MEMBERS.]

Becoming a member of LXer is easy and free. Join Us!