SSH Command help

About writing shell scripts and making the most of your shell
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Locked
pottsiex5

SSH Command help

Post by pottsiex5 »

Hi,
I am new to the ssh command. I am not having any problems connecting to the other computer, i just dont know how to do things like copy files to it or open a libreoffice file on or something. Any help or tutorials?
Joel
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
Pilosopong Tasyo
Level 6
Level 6
Posts: 1432
Joined: Mon Jun 22, 2009 3:26 am
Location: Philippines

Re: SSH Command help

Post by Pilosopong Tasyo »

...copy files...
If you're going to copy files between local host and remote host OR between two remote hosts, use the scp command instead.
...open a libreoffice file...
At least two ways to do it:

1. Use samba to share a folder on the remote host, then use your file browser (nautilus) to connect to the remote host and open the file from there. You will be using local resources but editing the file remotely.

2. Add the -X parameter when you ssh the remote machine. As an example for gedit:

Code: Select all

ssh -X username@remotehost.local
...
gedit /path/to/filename
OR, invoke it on a single line:

Code: Select all

ssh -X username@remotehost.local gedit /path/to/filename
You will be using resources on the remote host, so expect some screen lag.
o Give a man a fish and he will eat for a day. Teach him how to fish and he will eat for a lifetime!
o If an issue has been fixed, please edit your first post and add the word [SOLVED].
Locked

Return to “Scripts & Bash”