Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hint: configuring shared screen session #2

Open
midenok opened this issue Nov 27, 2013 · 0 comments
Open

Hint: configuring shared screen session #2

midenok opened this issue Nov 27, 2013 · 0 comments

Comments

@midenok
Copy link
Member

midenok commented Nov 27, 2013

1. create if necessary .ssh directory and .ssh/config file:
mkdir -p ~/.ssh
touch ~/.ssh/config
2. install openssh-server;
3. put your private SSH key into ~/.ssh directory;
4. change access mode for your private key:
chmod g=,o= <your_key>
5. add following section to your ~/.ssh/config:
Host yard
    HostName 89.111.176.172
    User u5709
    IdentityFile ~/.ssh/<your_key>
    IdentitiesOnly yes
    ForwardAgent no
    RemoteForward <your_port> localhost:22
6. then try to connect to host:
$ ssh yard
The authenticity of host '89.111.176.172 (89.111.176.172)' can't be established.
RSA key fingerprint is 9c:b6:a3:3c:b8:c0:cc:8d:2c:77:6f:7b:7c:02:db:e6.
Are you sure you want to continue connecting (yes/no)? yes
...
[u5709@fe126 ~]$

7. add following section to ~/.ssh/config on remote host:
Host <alias_for_your_host>
    Port <your_port>
    User <username_on_your_host>
8. now try to connect to your local host:
[u5709@fe126 ~]$ ssh <alias_for_your_host>
9. for security reasons put following into your local /etc/ssh/sshd_config:
# Disconnect after 15 minutes of inactivity
ClientAliveCountMax 15
ClientAliveInterval 60
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant