Advanced

ls

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

Nov 22, 2008
4:29 PM EST
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
7:08 PM EST
Mm, nice, I love tasty shortcuts :)
herzeleid

Nov 22, 2008
7:11 PM EST
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
8:04 PM EST
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[].

Post a reply to this thread:

A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.

Your message:
|||||
10
Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help

Sign up and post (it is free)  or  Log in and post