È possibile eseguire un semplice comando SSH in linea, ad esempio:
ssh foo@bar.com { cd foo/bar && rm *.foobar }
È possibile eseguire un semplice comando SSH in linea, ad esempio:
ssh foo@bar.com { cd foo/bar && rm *.foobar }
Risposte:
Se si desidera eseguire cd foo/bar && rm *.foobarsul computer remoto, è sufficiente farlo
ssh foo@bar.com 'cd foo/bar && rm *.foobar'
e vedi man ssh...
ssh [-1246AaCfgkMNnqsTtVvXxY] [-b bind_address] [-c cipher_spec] [-D
[bind_address:]port] [-e escape_char] [-F configfile]
[-i identity_file] [-L [bind_address:]port:host:hostport]
[-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port] [-R
[bind_address:]port:host:hostport] [-S ctl_path] [-w tunnel:tunnel
[user@]hostname [command]
Le parti che desideri:
ssh [user@]hostname [command]