Help answer threads with 0 replies.
Go Back > Blogs > neonsignal
User Name


Rate this Entry

remote shell access

Posted 05-08-2011 at 07:03 AM by neonsignal
Updated 05-08-2011 at 08:06 AM by neonsignal

Remote (and secure) access to another system makes use of the ssh package.

At its simplest, this provides secure copying from one machine to an account on another remote machine:
scp file user@remote_machine:~
Login to the other machine can be automated by creating a private/public key pair to sign the access. The public key is added to the authorized keys of the destination account. The private key must be kept secure.
ssh remote_machine sh -c 'cat >>.ssh/authorized_keys' <
Sometimes it can be useful to forward X11 sessions over ssh (ie, to remotely run applications with a GUI). The X11Forwarding flag needs to be enabled in the /etc/ssh/sshd_config configuration file of the remote machine:
set X11Forwarding yes
And then the ssh daemon restarted:
/etc/init.d/ssh restart
The remote GUI application can be run:
ssh -XC remote_machine application
Multiple ssh connections to the same machine can be made more efficient by sharing the session. The following changes are made to the /etc/ssh/ssh_config of the client:
ControlMaster auto
ControlPath ~/.ssh/%r@%h:%p
It makes security sense to restrict which users can ssh into a machine, by setting AllowUsers in the /etc/ssh/sshd_config:
AllowUsers user1@client_machine1 user2@client_machine2
Posted in Uncategorized
Views 2336 Comments 1
« Prev     Main     Next »
Total Comments 1


  1. Old Comment
    I'm a big fan of installing fail2ban when sshd is running...
    Posted 05-08-2011 at 02:04 PM by rich_c rich_c is offline


All times are GMT -5. The time now is 02:43 PM.

Main Menu

Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration