How to connect DB2 using SSH?

How to connect db2 IBM on AIX using SSH - SecureCRT ?
Please help me.

DB2 clients use a tcp connection, so you can ssh port-forward your connection if you have ssh login somewhere in the destination secure network area. Howe4ver, many shop policies say it must be all the way to the db2 server host, and most shops do not let general users log in to that host at the shell level, ssh or not.

Cleanest is DB2 has a native secure socket layer interface SSL (confusingly, often also called ssh although there is no shell involved), like https for http: DB2 Database for Linux, UNIX, and Windows

My privilege is root , I move to db2inst1 (cd db2inst1 ). So how to connect db2 anh select query ? Please help me and give me documents about this issue.

In the first case, you do an ssh with a tunnel from the local host to the db2 host, and define the local db2 instance as being on the local forwarded port.

In the second case, the db2 connections is defined as ssl in the server and client local configuration. The IBM doc on that link notes that not all clients talk ssl.

Your local UNIX id has no effect once you access an app with tcp or ssl, your permission is from the id you log in on. If you connect to an app locally, it may use your UNIX id and permissions to control the app. I believe db2 is always accessed through tcp.