Jump to content
Not connected, Your IP: 18.189.180.76
Sign in to follow this  
dr_kristau

AirVPN_Europe_SSH-22-AltEntry.sh

Recommended Posts

Hello!

I'm trying to run this shell script on Ubuntu. Using non-SSH .ovpn files work fine with openvpn, but when trying to run this script I get a series of errors which seem to involve missing files. This is what I get:

 

dr_kristau@kristau:~$ cd ~/Downloads
dr_kristau@kristau:~/Downloads$ ./AirVPN_Europe_SSH-22-AltEntry.sh
chmod: cannot access 'sshtunnel.key': No such file or directory

AirVPN SSH Tunnel
Warning: Identity file sshtunnel.key not accessible: No such file or directory.
OpenSSH_7.2p2 Ubuntu-4ubuntu2.1, OpenSSL 1.0.2g  1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 62.102.148.165 [62.102.148.165] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/dr_kristau/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/dr_kristau/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/dr_kristau/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/dr_kristau/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/dr_kristau/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/dr_kristau/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/dr_kristau/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/dr_kristau/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.7p1 Debian-5+deb8u2
debug1: match: OpenSSH_6.7p1 Debian-5+deb8u2 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 62.102.148.165:22 as 'sshtunnel'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:7n0f4LeVwbBFupoTBoHmGsKBg602KxKwe5jWzMHob9A
debug1: Host '62.102.148.165' is known and matches the ECDSA host key.
debug1: Found key in /home/dr_kristau/.ssh/known_hosts:1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/dr_kristau/.ssh/id_rsa
debug1: Trying private key: /home/dr_kristau/.ssh/id_dsa
debug1: Trying private key: /home/dr_kristau/.ssh/id_ecdsa
debug1: Trying private key: /home/dr_kristau/.ssh/id_ed25519
debug1: Next authentication method: password
sshtunnel@62.102.148.165's password: 

The password I have for AirVPN doesn't work here. Is there any more information other than on the page:

 

https://airvpn.org/ssh/

 

as to how to run this script file without error?

 

Many thanks.

Share this post


Link to post

One small thing for posterity:
 

Warning: Identity file sshtunnel.key not accessible: No such file or directory.


This can be resolved by downloading the sshtunnel.key file from the configuration page.

I'm not sure why I can't get it to work now. Oh well.
 

Share this post


Link to post

You have wrong permissions on the key file.

 

Now the permissions on the key file are -rw-------

 

What permissions are required?

Share this post


Link to post

Have now got this working. These are the steps (NB using AirVPN_Europe_SSH-22.sh instead of AirVPN_Europe_SSH-22-AltEntry.sh):

1) modify the AirVPN_Europe_SSH-22.sh so that the path to sshtunnel.key is correct

2) run the file (e.g. sudo /etc/openvpn/AirVPN_Europe_SSH-22.sh)

3) the SSH tunnel is now working - we can now open a new terminal window and run the ovpn file (e.g. sudo openvpn /etc/openvpn/AirVPN_Europe_SSH-22.ovpn)

 

this will give you AirVPN working through an SSH tunnel. To have this work automatically at start up:

1) move the AirVPN_Europe_SSH-22.sh and sshtunnel.key to /etc/network/if-up.d

2) again, modify the path to sshtunnel.key in the AirVPN_Europe_SSH-22.sh

3) rename AirVPN_Europe_SSH-22.ovpn to AirVPN_Europe_SSH-22.conf and put it in the /etc/openvpn/ directory

4) modify /etc/default/openvpn to use the conf file (e.g. AUTOSTART="AirVPN_Europe_SSH-22")

5) reboot

 

this works fine (apart from the fact that the xrdp connection no longer works), but my ISP seems to block this configuration - in under 250 seconds the connection is cut (the line is still open from another machine (without a VPN or SSH tunnel) connected to the same router). Using a plain VPN connection (e.g. AirVPN_Netherlands_UDP-2018.ovpn) works without a problem. I'll check if this is true for all possible Air SSH connections.

Share this post


Link to post

this works fine (apart from the fact that the xrdp connection no longer works), but my ISP seems to block this configuration - in under 250 seconds the connection is cut (the line is still open from another machine (without a VPN or SSH tunnel) connected to the same router). Using a plain VPN connection (e.g. AirVPN_Netherlands_UDP-2018.ovpn) works without a problem. I'll check if this is true for all possible Air SSH connections.

 

Final one on this (I hope). The cut out in under 250 seconds only seems to occur when opening a tunnel (SSH or SSL) at boot-up time using scripts in the /etc/network/if-up.d - if I let the system boot up without modifying network features and then apply the tunnel and VPN, I don't get this limit.

 

So I created a series of shell scripts on my desktop to compare various protocols all using the Ancha server (NL). I got (% of download speed):

UDP-443:  39%

TCP-443:  81%

SSH-22:    78%

SSL-443:   96%

 

I post this hoping somebody in the future may find it useful.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Security Check
    Play CAPTCHA Audio
    Refresh Image
Sign in to follow this  

×
×
  • Create New...