1

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.

muru
  • 197,895
  • 55
  • 485
  • 740

2 Answers2

2

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

Hydranix
  • 141
0

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.

lxx
  • 391