ssh-tunnel

rsync through ssh tunnel [closed]

三世轮回 提交于 2019-12-03 01:53:09
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I want to rsync to a cluster node to which I usually connect passing through another system: Say I connect first to ssh user@bridge and from there to ssh user@clusternode Now I want to rsync from my workstation to clusternode. I do the following: I open a ssh tunnel ssh -L8000:clusternode:8000 user@bridge I

Access Git repo via SSH tunnel

和自甴很熟 提交于 2019-12-02 19:25:40
I have access to an SSH account that can access a GIT server and am able to clone/push/pull the repo in this SSH login. However I cannot access this repo from elsewhere. On the SSH account I use, git clone git@gitserver:proj/myrepo.git to clone the repo. I tried setting up a ssh tunnel to the git server from another machine using, ssh -L 3333:gitserver:22 userid@sshserver git clone ssh://localhost:3333/proj/repo.git However I keep getting prompted for a password for the user 'git'. Any ideas what I am doing wrong here? When you do this: git clone git@gitserver:proj/myrepo.git an ssh client is

ssh dynamic port forwarding

旧街凉风 提交于 2019-12-02 16:23:26
问题 I want to use ssh dynamic port forwarding in my android code. I used the library jcraft , but unfortunately this library doesn't support dynamic port forwarding and just support local port forwarding and remote port forwarding . In the other word, I want to ssh like this, in my android code: ssh -D 10000 user@host Can anybody help me? 回答1: JSCH is a Java implementation of the SSH protocol. It's not a complete reimplementation of the OpenSSH ssh command-line utility. In the case of the dynamic

rsync through ssh tunnel [closed]

ⅰ亾dé卋堺 提交于 2019-12-02 15:30:17
I want to rsync to a cluster node to which I usually connect passing through another system: Say I connect first to ssh user@bridge and from there to ssh user@clusternode Now I want to rsync from my workstation to clusternode. I do the following: I open a ssh tunnel ssh -L8000:clusternode:8000 user@bridge I rsync from my workstation to clusternode rsync -e "ssh -p8000" source user@localhost:destination and it does not work, I get ssh_exchange_identification: Connection closed by remote host Why does it not work? What do I have to do? I have found a lot of information here: http://toddharris

ssh dynamic port forwarding

雨燕双飞 提交于 2019-12-02 11:05:23
I want to use ssh dynamic port forwarding in my android code. I used the library jcraft , but unfortunately this library doesn't support dynamic port forwarding and just support local port forwarding and remote port forwarding . In the other word, I want to ssh like this, in my android code: ssh -D 10000 user@host Can anybody help me? JSCH is a Java implementation of the SSH protocol . It's not a complete reimplementation of the OpenSSH ssh command-line utility. In the case of the dynamic proxy feature, JSCH provides the ability to tunnel TCP connections through an SSH session, but it doesn't

SSH port forwarding in Docker

∥☆過路亽.° 提交于 2019-12-02 06:12:44
I have these two containers, say backend (CentOs) and mongo . What I would like to have is that from within the backend container I can connect to the mongo database as if it was running locally, $> mongo localhost:27017 Anyway, as far as I understand all this, you can map the port localhost:27017 to mongo:27017 like this $backend> ssh -L 27017:mongo:27017 root@mongo However, if I do this I have to provide the root password and after that it logs me into the mongo container and no port forwarding is happening Background: I want to do this because I'm running a Java program which connects to a

How to use Node.js to make a SSH tunneling connection to a MongoDB database

…衆ロ難τιáo~ 提交于 2019-12-01 02:09:53
My credentials work perfectly with Robomongo but I can't make the connection with node.js I have tried to make the connection using ssh2 and tunnel-ssh npm module and failed both times. -The mongo connection does not require a password -The ssh connection is made with a pem key This is the code I've used with ssh2 module, I can establish the tunneling correctly but the mongo connection fails var Client = require('ssh2').Client; var conn = new Client(); conn.on('ready', function() { console.log('Client :: ready'); //mongo connection mongoose.connect('mongodb://localhost:27000/'); var db =

Scp through ssh tunnel opened

▼魔方 西西 提交于 2019-12-01 01:48:57
I want to send files from machineA which has opened a reverse tunnel with a server. The reverse tunnel connects port 22 on machineA with port 2222 on the server: autossh -M 0 -q -f -N -o "ServerAliveInterval 120" -o "ServerAliveCountMax 1" -R 2222:localhost:22 userserver@server.com If I do: scp file userserver@server.com:. then SCP sends the file with a new login over SSH, in my case using public/private key. But if I do: scp -P 2222 file userserver@localhost:. I get a "connection refused" message. The same happens if I replace 2222 above with the port found with: netstat | grep ssh | grep

Scp through ssh tunnel opened

假装没事ソ 提交于 2019-11-30 21:09:06
问题 I want to send files from machineA which has opened a reverse tunnel with a server. The reverse tunnel connects port 22 on machineA with port 2222 on the server: autossh -M 0 -q -f -N -o "ServerAliveInterval 120" -o "ServerAliveCountMax 1" -R 2222:localhost:22 userserver@server.com If I do: scp file userserver@server.com:. then SCP sends the file with a new login over SSH, in my case using public/private key. But if I do: scp -P 2222 file userserver@localhost:. I get a "connection refused"

How to connect MySQL database using Python+SQLAlchemy remotely?

别来无恙 提交于 2019-11-30 09:02:56
I am having difficulty accessing MySQL remotely. I use SSH tunnel and want to connect the database MySQL using Python+SQLALchemy. When i use MySQL-client in my console and specify " ptotocol=TCP ", then everything is fine! I use command: mysql -h localhost —protocol=TCP -u USER -p I get access to remote database through SSH-tunnel. However, when I want to connect to the database using the Python+SQLAchemy I can't find such option like —protocol=TCP Otherwise, i have only connect to local MySQL Databases. Tell me please, is there a way to do it using SQLAlchemy. The classic answer to this issue