User Tools

Site Tools


linux:ssh

This is an old revision of the document!


generate key

$ ssh-keygen -t rsa -b 4096

ssh agent

If your private key is encrypted with a passphrase(when you generate it by ssh-keygen), the passphrase must be entered every time you attempt to connect to an SSH server using public-key authentication.

SSH agent is a program which caches your decrypted private keys and provides them to SSH client programs on your behalf.

$ eval $(ssh-agent)

$ echo $SSH_AUTH_SOCK

$ ssh-add (add ~/.ssh/id_rsa by default)

$ ssh -T user@remote.com

ssh tunnel ssh -L

How to access the Database Home Page "http://127.0.0.1:8080/apex" remotely using ssh tunnel.
  1. install sshd package on your local machine
  2. add a line in /etc/sshd/sshd_config
    AllowTcpForwarding yes
  3. restart sshd service
  4. ssh to start tunnel
    ssh -L 8081:localhost:8080 <oracle db host>
  5. login to db web admin console http://localhost:8081/apex
  6. login with 'SYS' account, then click the 'Administration' button, 'Tasks - Manage HTTP Access' , then enable HTTP access from remote clients.
SSH file transport
$ tar -cf - xen_el5_i386_para | gzip -c -9 | ssh root@ostest117 "gzip -dc | tar -xf - -C /OVS/rpool"
$ tar czf - xen_el5_i386_para | ssh root@ostest117 "tar xzf - -C /OVS/rpool"
linux/ssh.1485196872.txt.gz · Last modified: 2017/01/23 10:41 by frank