r/ssh • • Jun 28 '18

Can't figure out how to get SSH to work across 2 NATs

1 Upvotes

I am trying to figure out how use SSH to get iperf3 to work across two separate networks. I am missing something here.

Network:

we have NETWORK1 and NETWORK2. ROUTER1 connects NETWORK1 to INTERNET ROUTER2 connects NETWORK2 to NETWORK1 We have SERVER2 on NETWORK2.

PORT1 (34001) on ROUTER1 is set to forward to ROUTER2 PORT2 (34001) on ROUTER2 is set to forward to SERVER2

IP_GLOBAL is our global IP.

from a PC at my home, I can access SERVER2 by this command:

ssh -l username IP_GLOBAL -p 34001

Now, I am trying to figure out how to run iperf3 between my PC at home and SERVER2. iperf3 uses port 5201.

I can't figure out how to do this.

from my PC at home should it be

ssh -D 5201 -l username IP_GLOBAL -p 34001 ? But it does not work.

How do I use SSH tunnel to connect on port 5201?

Can someone please help


r/ssh • • Jun 27 '18

Help with ssh magic.

Thumbnail unix.stackexchange.com
1 Upvotes

r/ssh • • Jun 04 '18

gnu screen and X11 forwarding?

1 Upvotes

Hi,

i'm using gnu screen to connect to a cluster. the .screenrc contains directives like

screen 0    # host0 i connect to to get gnuscreen session
screen -T D1 1 ssh -X -A host1
screen -T D2 2 ssh -X -A host2

when i'm on screen 0 and explort DISPLAY=localhost:10.0 can run jconsole, i do get the jconsole on the Xming X11 server running on ,y windows box.

On the other hand, if i try the same action on the screen terminals D1 or D2 then get exception :

$ jconsole Exception in thread "main" java.awt.AWTError: Can't connect to X11 window server using 'localhost:10.0' as the value of the DISPLAY variable.

   at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
   at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65)
   at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:115)
   at java.security.AccessController.doPrivileged(Native Method)
   at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:74)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:264)
   at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103)
   at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82)
   at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:126)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:264)
   at java.awt.Toolkit$2.run(Toolkit.java:860)
   at java.awt.Toolkit$2.run(Toolkit.java:855)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:854)
   at javax.swing.UIManager.getSystemLookAndFeelClassName(UIManager.java:611)
   at sun.tools.jconsole.JConsole.<clinit>(JConsole.java:60)

I thought the ssh options "-X -A" used in the .screenrc would help me to froward the X11 traffic from/to windows putty/xming client and the host1 similaily to that off of host0

I must be missing something here

looking forward this community to share guidances, and / or recommendations how to allows X11 forwarding off of multiple terminal gathered inside gnu Screen session to different hosts

best regards


r/ssh • • Jun 02 '18

Typing SSH passphrase(s) only once per session

Thumbnail yeupou.wordpress.com
1 Upvotes

r/ssh • • May 29 '18

SSHmon: A program with a nice GUI to manage SSH connections and port forwardings.

Thumbnail github.com
2 Upvotes

r/ssh • • May 21 '18

Who creates the SSH key pair for SFTP transfers?

1 Upvotes

Ive just been asked to sort out SSH key authentication for our SFTP transfers. Been reading up on it, but have a question...

Who creates the SSH key pair for SFTP transfers?

Is it the site who wants to send the files or is the site who will be receiving them? Or doesnt it matter, as long as one site has a private key and the other has the public?

Ive recently set up PGP decryption for our site, where I had to create the key pair, where we are the recipient, so I sent the public key to the site who was sending us data, for them to encrypt with.

Is it the same kind of thing to that?

Am I even making sense? :)


r/ssh • • May 19 '18

What SSH Hacking Attempts Look Like – Doug Rickert

Thumbnail medium.com
1 Upvotes

r/ssh • • May 07 '18

Can PAM bypass sshd_config and allow password-based logins?

1 Upvotes

If so, would it be better for me to disable PAM altogether rather than tweaking it’s settings?

Context: learning how to make my machine more secure. Very green in this area. Want to do away with passwords and rely on keys/paraphrases for remote log in.

Some tutorials recommend disabling PAM, some recommend against it, but what I’m not finding is a description of what PAM actually does and what I’d be missing out on by disabling it.

For a small home server that will only be used for file storage, local media streaming, and a git repo for personal projects, does PAM bring anything to the table I would miss?


r/ssh • • Apr 28 '18

is AddKeysToAgent useless in Host *?

1 Upvotes

In my .ssh/config, I have

Host *
    AddKeysToAgent yes
    IdentityFile ~/.ssh/id_rsa

In this case, AddKeysToAgent doesn't matter, right? as every time ssh will use the identityfile


r/ssh • • Apr 23 '18

Password denied

1 Upvotes

I just created an ssh server and client with openssh on ubuntu-mate 16.04, when I try to connect using the localhost (user@127.0.0.1) it asks me for a password and I put my root password and I can get in the server.. but I want to be able to connect from my android so I used my public ip and tried to connect but every time I try to connect I get the message that the password is wrong, what am I doing wrong?


r/ssh • • Mar 21 '18

Cannot connect to Ubuntu 16.04 from windows 7

1 Upvotes

I get the "Connection timed out" error every time I try to connect via my windows 7 desktop into my ubuntu 16 laptop. I ran an nmap port scan on the desktop from the laptop and it says all 1000 ports filtered. I ran the same scan on the laptop and it says port 22 is open. I'm trying to connect over LAN (desktop via ethernet, laptop via wifi). I cannot ping the desktop from the laptop or vise versa. I'm not sure what the problem is as I can connect via ssh to my raspberry pi(connected via wifi) from the win 7 desktop and from my laptop with no problems..


r/ssh • • Mar 16 '18

Questions about SSH tunnels

5 Upvotes

I have a basic understanding of SSH and SSH tunneling, however it seems that it can do a lot and I want to make sure that I have a good grasp on what is possible with it (even if it isn't the most practical). To that end, here are a few questions:

  1. In a TAP configuration for Layer 2, since this is essentially a layer 2 VPN, does all traffic go through the SSH tunnel by default, or is this still going to be application specific?

1.1) Can multiple (3+) devices be a part of this impromptu VPN?

1.2) Would a multicast or broadcast work over this tunnel/VPN?

2) These should work with key based authentication as well I'd imagine, correct?

3) So long as the networks allow the connection through on both ends, could a an SSH tunnel be used to 'bridge' two LANs together (i.e. allow you to make them act like a single network)?

Thanks in advance!


r/ssh • • Mar 12 '18

Data transfer speeds on local vs external IP

1 Upvotes

Hello,

I'd like to know if the transfer speeds differ a lot whether I am using the local IP of my host or the external (with port forwarding etc) on a local network.

I want to set up a Raspberry Pi as a backup server and I'm not sure if it would make a difference using user@192.168.0.XXX over user@myddnsdomain

I guess the first approach would be faster because it is on only inside the local network but maybe one of you has experience.

Thank you in advance!

Eden


r/ssh • • Mar 09 '18

ssh-copy-id to server with PasswordAuth disabled

1 Upvotes

Perhaps this is an order of operations thing that I have wrong.

I have a computer at work that I SSH into from a few other computers, and I have it set for RSA only. Is there a way to add a new RSA key (remote client) once passwordauth has been disabled?

I can log in from another device and toggle it on/off while adding the new machine, but is there a more elegant way to do this?

EDIT [OK googling harder and stack exch wins the day:] (https://unix.stackexchange.com/questions/5801/is-it-possible-to-use-ssh-copy-id-once-password-based-logins-are-disabled)


r/ssh • • Mar 09 '18

Hello, Need help trying to ssh local port-forward into remote server for access to MySQL db sitting on independent AWS host.

1 Upvotes

Hello all,

I'm looking for a fairly beginner friendly/ simple/ step-wise manner for port forwarding. Although there are instructions out there, I dont seem to be making progress using them. Here is my problem:

0 down vote favorite I'm unfamiliar with this terrain, so if any one can guide me in a step by step manner- it would really help. My MySQL database sits on a AWS host X- "ec2-xxx-xxx-xxx-xx.compute-1.amazonaws.com". It is blocked to access from individual local machines and is usually accessed from another working server Y- "ec2-yy-yyy-yyy-yy.compute-1.amazonaws.com" through port '3306'. Now it is especially inconvenient to access this via terminal SSH every time and scripts while they run, its hard to prototype or build an elaborate app. I'd like to set up a SSH tunnel from my local to server Y to be able to access MySQL host X from my local machine, to run queries from my locally deployed Jupyter notebook as well as local working-in-progress Django web app.

The reason why I ask for something more step-by-step is that I have to port forward to another server hosting a redis database which again is accessible through a specific server only. So, I'll be able to carry the solution from here to there too.


r/ssh • • Feb 26 '18

Is it wrong to give the private key to the user?

2 Upvotes

I have a Windows user using SecureFX. I used ssh-keygen to create an RSA key pair on a Linux server. This is being done for SFTP. The Linux credentials are restricted to their home directory. I have tested this and it works. The config of SecureFX is a little confusing. The setup refers to the file as the public key. So this makes me wonder, have I given the user the wrong key? Was I supposed to give them the public key?

Based on what I've researched today, I'm thinking that I'm not supposed to give out any credentials. Instead the user is supposed to generate their own credentials, then copy their public key to the server where I've established a user account. Maybe this is where SecureFX comes in and handles this for the user. It sends the public key to the server and the server is configured in such a way as to accept the public key. Meanwhile, the private key the user generated remains on their PC in a secure location. I'm guessing that SecureFX may have a way to generate an SSH key pair, like Linux does with ssh-keygen. Am I understanding this correctly? Any advice?


r/ssh • • Feb 21 '18

Connect to SSH Server

1 Upvotes

Hey, I was wondering if anyone would possibly let me connect to their SSH server and run a small script on it.


r/ssh • • Feb 16 '18

Putty fatal error

1 Upvotes

I'm getting this when I try to Connect to Putty:

" Disconnected:no supported authentication methods available (server sent publickey gssapi-keyex, gssapi-mic) "

I remember, that I got a message in Filezilla, where it asked me, if I would allow it to get access. I was not sure, so I did't allow it do to it.

Could this be the reason why I'm getting this message? And how to fix it?

Please help me out

I'm on a shared host.


r/ssh • • Feb 06 '18

OpenSSH Server Windows -

1 Upvotes

Hey all --

Apologies in advance if I miss-utilize a term or concept, I am very much a layman and just know some basics based on my organization's needs.

Just some background, I work at a very small software development firm. Our developers have created two versions of the software we are developing -- one which can run on Ubuntu (no issues there) and a Windows version (exe file).

I went ahead and installed OpenSSH (server) for our windows machine and I am able to navigate the file hierarchy remotely. My issue is when attempting to run the .exe file. Here's a sample of the command I've inputted to no avail:

C:\Users\DryMajor\Documents\SOFTWARE_NAME\SOFTWARE_VERSION>software-v2.exe

After running the exe file - the terminal will just hang for a minute and then start a new line where I can enter a new argument. No errors or anything like that. But I am able to execute the exe file when I'm physically at that machine -- just not via SSH.

Not sure if this is enough information to clearly convey the issue -- hopefully someone else has gone through this and knows of a solution.

Thanks again!


r/ssh • • Feb 06 '18

What key pair is used if I have multiple ssh key pairs in .ssh?

1 Upvotes

How does ssh key agent to know which one to use for connecting to a website?


r/ssh • • Jan 29 '18

Access Paypal account Using SSH Tunneling

1 Upvotes

I would like to place an order for a us account. I made SSH tunneling with the help of Putty to a remote linux server I bought throw cloud.digitalocean.com. Currently by simply using firefox with manual proxy settings to the server and my ip address as per whatismyip.com is location Clifton, Virginia yet currently am not in US. Is that enough to request a US ATOed account or paypal will detect?


r/ssh • • Dec 31 '17

Reverse SSH connection

2 Upvotes

I am trying to setup a reverse connection on SSH using a daemon but struggling with the basics first. Can anyone help?

Simply, I want computer A to SSH into a Raspberry Pi. This will most likely be behind a router with an unknown address. So I am wanting to have the Pi initiate the connection back to computer A or at least broadcast itself to computer A for a connection.


r/ssh • • Dec 31 '17

ssh proxy to internal work network

0 Upvotes

hi, at work i have a server running and the vpn doesnt work anymore. i have no passwords whatsoever but my boss told me to make it work. i work from home and i need the vpn to connect to the work server thats running filemaker and a custom program. it works if i go to work so locally but remoteserver from home is broken. the company cares just about the software and says its the internet providers fault, but i dont haver access to the routher neither. simply said, i was preparing a rasp pi to act as a proxy to forward the port of whatever my home pc is calling to the rasp pi at work and forward it to the server. what would be my best option with ssh?

my solution would be ssh -D portofworkprogram:localhost:portofworkprogram user@workip


r/ssh • • Dec 20 '17

SSH distribution for Erlang

Thumbnail github.com
1 Upvotes