Subject Re: Using Firebird Through SSH
Author Maurice Ling
--- In firebird-support@yahoogroups.com, Alexandre Benson Smith
<iblist@t...> wrote:
> Maurice Ling wrote:
>
> >Hi,
> >
> >I have a problem here that I hope someone can help. I need to use my
> >Firebird database (remote) through SSH. How can I get connected to my
> >remote database using isql.
> >
> >I've made a SSH tunnel using "ssh -L 3000:localhost:22 <remote host>".
> >No log in is required because I've set it to using public key
> >authentication. However, when I try to connect to the remote database
> >using isql, I get the following:
> >
> >Maurice-Lings-Computer:~ mauriceling$ isql
>
>localhost:3000:/Users/mauriceling/MyProjects/Muscorian/BioDatabases/muscopedia.fdb

> >-u mouse -p mouse
> >Statement failed, SQLCODE = -902
> >
> >Unable to complete network request to host "3000".
> >-Failed to establish a connection.
> >-Operation timed out
> >Use CONNECT or CREATE DATABASE to specify a database
> >SQL>
> >
> >At the same time, I am creating a program using Python and kinterbasdb
> >and is working nicely if both my program and the database is in the
same
> >machine, how can I get connected through SSH if I'm on different
machines?
> >
> >Thanks a lot.
> >
> >Cheers
> >Maurice
> >
> >
> >
> Hi, Maurice !
>
> use "/" to specify the port number.
>
> Maurice-Lings-Computer:~ mauriceling$ isql
>
localhost/3000:/Users/mauriceling/MyProjects/Muscorian/BioDatabases/muscopedia.fdb

>
>
> see you !
>
> --
>
> Alexandre Benson Smith
> Development
> THOR Software e Comercial Ltda.
> Santo Andre - Sao Paulo - Brazil
> www.thorsoftware.com.br

Hi Alexandre,

I've tried and it seems impossible to connect through any other ports
than 3050. That is,

ssh -L 3050:localhost:22 <remote host>
isql localhost/3050:<remote database>

It seems that the localhost port 3050 is critical for connection, it
seems to be able to work with any other unused ports on the remote
host. For example, the following works:

ssh -L 3050:localhost:20000 <remote host>
isql localhost/3050:<remote database>

But this won't work:

ssh -L 3000:localhost:22 <remote host>
isql localhost/3000:<remote database>

Cheers
Maurice