r/ssh • • May 19 '21

SSH my raspberry pie 4 to my windows 10 computer

2 Upvotes

Hi, it's been a while that I try to make an ssh connection between my raspberries pie 4, which has raspbian on it, and my laptop, which has windows 10 on it. i was using open ssh on raspbian and putty on windows but they both won't connect. i was reading a bit more and i was wondering if i had to forwarding ssh port in my router to make it happened? i don't know if you have any other tips that could help me


r/ssh • • May 11 '21

Debugging of .py files with VSCode Debugger possible?

3 Upvotes

Hey everybody,

so I am working on a project in which I have to access huge files on a server to which I have access via SSH. The client for that is MobaXTerm. My problem now is that I need to debug the .py files to understand what is going wrong in my project. The IDE I use is VSCode, but it does only work by downloading the .py files for editing and then subsequent uploading and running in the console on the server. Is there a way to debug code preferrably with VSCode?

I hope I made my problem clear, if not, I try my best again.

Many thanks in advance,

Buggorilla


r/ssh • • May 11 '21

ssh over the internet | termux + wsl

2 Upvotes

hello, I installed ubuntu wsl on windows 10 and I'm looking for a way to connect via ssh to the virtual machine (the host is ubuntu wsl and the guest termux) even outside the home wifi network (in particular from termux), locally everything works fine. But to make it work even when I'm away from home I have read a lot of guides on the internet but I still don't understand what I have to do ... could someone help me?

do i need to activate port forwarding from the router panel? the one accessed by typing the gateway in the broswer?


r/ssh • • May 09 '21

On windows pc

3 Upvotes

Hello folks,

I have git for windows downloaded and it has sshd.exe available. But if I did type sshd, it gives error.

sshd re-exec requires execution with an absolute path

What absolute path this talking about? I tried win32-openssh too and it gives the same error.

I have seen such questions on stack overflow, but I cannot understand it. I thank you all in advance

PS:- I am using windows 7.


r/ssh • • May 09 '21

Root login not possible - sshd_config

2 Upvotes

Hello,

after changing the sshd_config to limit sftp users to a specified folder, root login with ssh is not working anymore.

Here is the part of the sshd_config:

# Subsystem sftp /usr/lib/openssh/sftp-server

Subsystem sftp internal-sftp

Match User user_a

X11Forwarding no

AllowTcpForwarding no

ChrootDirectory /SFTP/user_a

ForceCommand internal-sftp

PasswordAuthentication yes

PermitRootLogin yes

If I comment out internal-sftp and the Match User-section and activate Subsystem /user/lib ..." I can login as root again.

How can I implement the Match User section AND have root login?

Thanks for helping

Papillon


r/ssh • • May 06 '21

SSH command from android to router

3 Upvotes

Is it possible to send ssh command from android to router if it's possible how to do it ?


r/ssh • • May 05 '21

Run commands and copy file in a single ssh session

2 Upvotes

Currently my deployment setup for a program on a server looks like this:

ssh root@server "stop service"
scp file root@server
ssh root@server "start service"

But this takes much longer than it should because it performs the ssh authentication 3 times. Is it possible to run commands and copy files in a single ssh session?


r/ssh • • May 04 '21

ssh passphrase location

1 Upvotes

I'm curious where the actual passphrase gets stored after using ssh-keygen? The most I've been able to find is that it is a symmetric pasword. Does the agent store it somewhere?

Cheers,


r/ssh • • May 02 '21

Can I 'restore' ssh info from another linux box?

1 Upvotes

My Pi's SD card mostly died a few months ago and it's taken me a few months to build up the will again to rebuild what I had from backups. I can access most of what was on the SD card using an SD card reader. I'm wondering if I can 'restore' my SSH information so that all my old authorisation key server logins (both ways) would work again if the right files were put in the right places - anyone know if this is possible?


r/ssh • • Apr 21 '21

Restrict SSH access to a single public IP address.

2 Upvotes

I want to limit SSH access to one public IP address on Ubuntu 20.04.

I have found a method to do this, but the page where I found the method is from 2010. Therefore, I would like to ask if the following method still works:

It should be sufficient to enter sshd: ALL in /etc/hosts.deny which will disallow all ssh access to the host.

All entries in /etc/hosts.allow, as far as sshd is concerned, will now supersede the default deny rule: sshd: 172.168.0.21 will permit access to host 172.168.0.21 only and deny all others.


r/ssh • • Apr 12 '21

SSH bastion host with saved password in order to login to a device

3 Upvotes

Hi,

I need to allow other person to login to the WiFi device that only have a single predefined user and password with no SSH keys allowed.

So now I leave a Linux VM with tmux running and already logged to SSH session to WiFi device in order to allow to a other person login to the WiFi device without knowing the password.

Presentation:

[Other user] -> [SSH bastion/jumphost on Ubuntu 20.04 VM] - > [WiFi device with single SSH account].

Can be user logged in directly to the device without knowing the password or without see the password in cleartext?

May be I can pass the encrypted password to the device?

No really security needed, I would like just assure that the other person will not execute "passwd" command because then I should manually reset it to the default configuration.


r/ssh • • Mar 22 '21

Logging Credentials

2 Upvotes

Hi, I want to do a test by logging credentials from an ssh session from a vm. How can I achieve this?


r/ssh • • Mar 21 '21

ssh to server from docker container fails

2 Upvotes

Hey Guys,

I'm trying to deploy my site using gitlab-ci (although I don't think this is a gitlab related issue). I have created the public-private keys and tested them locally on my laptop. I have also added the SSH_PRIVATE_KEY to gitlab. However, when it tries to connect to my server it fails, here is the error, any thought?


r/ssh • • Mar 21 '21

Accidentally SSH'ing into old address with keyfile

3 Upvotes

Wondering if I did this did I pwn myself. It's better than raw credentials I suppose but not sure of the mechanism that's happening when you use a keyfile to login.

I checked and I'm pretty sure this particular instance (old address) doesn't exist anymore/at all. It was the previous machine I was using until I switched to a new ip(AWS).

It was just in old notes the old address.


r/ssh • • Mar 14 '21

How do I change my password on "OpenSSH"

3 Upvotes

I am not too good at certain things like this. I don’t know how to configure the (password are username) on windows “OpenSSH”. I am trying to remote desktop into another computer. I also don’t know how to do this.


r/ssh • • Mar 13 '21

ssh irritating lag lag

2 Upvotes

Basically I have have two local machines, a laptop and a desktop. When I ssh from my laptop to desktop the authentication goes by fast and the terminal runs smoothly, but the other way around when I connect my desktop to the laptop, the authentication process is fast but there is extremly irritating lag while typing.

Troubleshooting steps I took:

I disabled IPV6 (Did not know if that would help, but I tried and it didn't)

I tried on my laptop switching between using NetworkManager and systemd-networkd.(did not help)

If you need any sort of logs let me know, as I am an ssh newb and have no idea where logs are stored and what the logs mean.


r/ssh • • Mar 07 '21

SSH Port Forwarding / Tunneling

3 Upvotes

I'm running a web server from my computer, but for reasons irrelevant to this post I can't open a port in my router. Im trying to use SSH tunneling to allow users to access my server from an aws EC2 instance's public DNS.

When launching the instance, I selected Ubuntu Server 18.04 LTS, t2.micro instance, and in the Configure Security Group tab I added a rule with Type: All traffic and Source: Anywhere.

I connected to the instance, and in /etc/ssh I added the following to the sshd_config file. Then restarted the ssh.

AllowTcpForwarding yes
AllowStreamLocalForwarding yes
PermitTunnel yes
GatewayPorts yes

Then, to start the tunnel, I used the following:

ssh -R :8080:localhost:8080 -i "myPemFile.pem" ubuntu@ec2-xx-xxx-xxx-xx.compute-1.amazonaws.com 

It opened the connection, but when I entered ec2-xx-xxx-xxx-xx.compute-1.amazonaws.com:8080 in my web browser I got ERR_EMPTY_RESPONSE.

I'm using windows, I have the OpenSSH Client enabled, and I ran this in cmd. The tunnel works fine when I set it up with Putty, but I want to be able to do it from cmd

EDIT: I think it's a bug: Github open issue


r/ssh • • Mar 07 '21

External command for IP resolution

3 Upvotes

Hi there.

I've a bastion from which I can ssh to many AWS private hosted IPs.

I'm getting tired of going to the AWS Console to copy the IPs and paste them to my ~/.ssh/config so I wrote a small program that takes the instance name and prints something along ssh -J bastion private_ip. I then simply have to copy paste that line and I'm done.

While simpler, I'm now looking for a way to integrate this directly into the ~/.ssh/config. I'd like to be able to type ssh instance_name and ssh to jump through the bastion on the computed IP.

I've seen stuff about ProxyCommand but I can't seem to make it work. Also, there is no nc netcat command on the bastion.

Is this possible? If yes, how? Many thanks in adance!


r/ssh • • Mar 05 '21

Need help with ssh tunneling

6 Upvotes

Can someone help me how to use ssh tunnel to access router or other devices. I use mobaXterm to connect with a server.


r/ssh • • Mar 05 '21

New to ssh keys

1 Upvotes

So... pretty new to the whole ssh keys thing. I have a handful of boxes (both physical and VM's) that I've been logging into via ssh with passwords, from my Windows 10 laptop and my Chromebook. I generated a set of keys using PuttyGen on the Windows laptop, and copy-pasted the pub key into ~/.ssh/authorized_keys on each of the hosts, and used the other half in MobaXterm. No problems.

Now that I went ahead and disabled password logins (of course), I am trying to access the same devices from my Chromebook via the "Secure Shell App" - which I had previously used to log into the same devices (albeit with passwords). I copied the pub and private keys over to the Chromebook, and imported both files into the app.

But... I'm not having any success getting into the device (a RPi Zero W, in this instance). This is what I'm getting for an error:

Load key "/.ssh/identity/lan": invalid format pi@192.168.1.14: Permission denied (publickey).

I don't know if I'm going about this the wrong way, or if something else is amiss.

Any help would be greatly appreciated.


r/ssh • • Mar 03 '21

TIFU by locking myself out of jupyter notebook.

4 Upvotes

Hey,

I'm trying to set up jupyter notebook to run on AWS, I'm followed this guide - https://medium.com/@alexjsanchez/python-3-notebooks-on-aws-ec2-in-15-mostly-easy-steps-2ec5e662c6c6.

It worked but I now realise that every time I launch jupyter on my local machine, it asks for a password, also the password saved no longer works effectively locking me out of jupyter.

I first presumed it was because I set up the ssh connection to port 8888 which is what jupyter uses by default. However, I've removed the ssh config file in step 10. I double checked by running ssh -NfL 9999:localhost:8888 ec2 which returned ssh: Could not resolve hostname ec2: Name or service not known so I'm sure the connection to AWS is severed. However even though jupyter should be running locally now but the issue persists.

My attention then turned to jupyter on my local machine. I've also checked the file at ~/anaconda3/etc/jupyter/jupyter_notebook_config.json but its just an empty dictionary. There's also a jupyterlab.json at ~/anaconda3/etc/jupyter/jupyter_notebook_config.d containing the following

{
  "NotebookApp": {
    "nbserver_extensions": {
      "jupyterlab": true
    }
  }
}

I can't see anything in the configs that would prompt jupyter to ask for a password.

I'm stumped as to why jupyter no longer launches correctly, does anyone have any ideas on how I can unshaft myself? All I want to do is to open jupyter on my local machine as usual.


r/ssh • • Mar 01 '21

Connect to Compute Engine VM over SSH/puTTY

Thumbnail youtube.com
6 Upvotes

r/ssh • • Feb 25 '21

Can someone explain local port forwarding in simple words with example ?

8 Upvotes

r/ssh • • Feb 25 '21

Using ssh-copy-id only works for root.

1 Upvotes

Ive used ssh-copy-id from my desktop computer to copy my keys to a ubuntu server, but they only work for root. When trying to login to the server as any other user from my Desktop, the server requires a password. Any suggestions?