is there any command or way to access the other machine terminal into mine to execute commands for other machine that is on the same network.
-
easiest way installing team viewer or vnc try to search adding to ubuntu – Mohamed Slama Jun 22 '16 at 04:23
-
9You are probably looking for SSH. – edwinksl Jun 22 '16 at 04:25
-
4@edwinksl https://help.ubuntu.com/community/SSH/ – wjandrea Jun 22 '16 at 04:27
-
through this SSH can we able to execute commands on others machine – Mirza Hassan Ali Baig Jun 22 '16 at 04:32
-
@MirzaHassanAliBaig Yes. Read the page I linked. – wjandrea Jun 22 '16 at 04:53
-
@guntbert I think the answers to that question aren't comprehensive enough regarding installation and setup for it to be considered a duplicate. – wjandrea Jun 22 '16 at 14:50
2 Answers
Install the ssh server on the remote machine if it isn't already installed. (requires package openssh-server
on remote machine, to get the remote machine set up, follow this guide: Link)
Then use the command from your computer, where "john" is the username of the user you want to log into the remote machine with, and "1.2.3.4" is that machines ip.
ssh john@1.2.3.4
You'll be prompted for the password of that user on that machine.
To set up more secure access, use this command(s)
ssh-keygen
Follow prompts.
ssh-copy-id john@1.2.3.4
Enter password one last time, and now you no longer need to use a password for user john when using ssh to access 1.2.3.4 .
This is more secure as you can disable password authentication in sshd-config
. See: Here

- 141
ssh to login and run commands
scp to copy files
Can also use sftp to copy files
previous question and answers on scp Using scp to copy files from remote to home machine
A bit more advanced If you need to run commands or programs that will take a while to run and you don't want to disconnect your session - You could use screen, tmux or byobu.