-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
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
Metadata
Metadata
Assignees
Labels
No labels