Categories
User Help

Can’t do ssh port forwarding via systemd

I can run port forwarding command in terminal, but command doesn’t work when running via systemd. Command(perfectly works when running manually): /usr/bin/ssh -vvv -i /home/alex/.ssh/id_ed25519_npp -NT -R 1194:localhost:1194 alex@ya Here is systemd service unit: [Unit] Description=SSH tunnel After=network.target [Service] Type=simple Restart=always RestartSec=15 User=alex ExecStart=/usr/bin/ssh -vvv -i /home/alex/.ssh/id_ed25519_npp -NT -R 1194:localhost:1194 alex@ya [Install] WantedBy=multi-user.target Here is […]

Categories
User Help

Why does ssh clone from gitlab repo need password from WSL but not Linux-native PC?

From a Linux-native desktop, I am able to clone a project from our gitlab repo like this: git clone git@git.company.com:namespace/project.git No problem with the above: specifically, I’m not asked for the git@git.company.com password. I’ve needed to switch to Windows 10 Subsystem for Linux (WSL); when I try the same project cloning, I am prompted for […]

Categories
Mastering Development User Help

ssh Permission denied()

I am trying to ssh user@ip-address and I get Permission denied () error. Earlier I had Permission denied (publickey,password) and changed the ssh_config to PasswordAuthetification=no and in sshd_config PubkeyAuthentication=no, but permission denied is still there. sshd_config: StrictModes no PubkeyAuthentication no AllowTcpForwarding yes GatewayPorts yes X11Forwarding yes PrintMotd no TCPKeepAlive yes AllowUsers user # Allow client […]

Categories
Mastering Development System & Network

SSHFS – Can mount from command line but not through fstab

I have a FreeNas 11.2 server on which I have a user named “unifi-video” for which I have set a home folder and given a public key. I also have another machine that acts as a Unifi Video NVR (Network Video Recorder), let’s call it the “NVR”. I want the NVR to write onto the […]

Categories
Mastering Development System & Network

Permission denied (publickey) – Troubleshooting sshd pulling public keys from LDAP Server

1. Problem Summary: Hi, recently, in our infrastructure production environment, new users are unable to ssh into a debian jump server. The jumpserver’ SSH daemon retrieves the SSH public keys from the LDAP Server. We verified sshd local configuration, sshd logs, LDAP public keys presence and we are unable to fully understand what is preventing […]

Categories
Development Linux

Stuck not being able to setup the private/public key

So, this is what I’m trying to do, my windows 10 will connect to the remote Operating System, CentOS 7. I did ssh-keygen on the windows. Then using WinSCP, I copied the contents of id_rsa.pub on the remote server at /.ssh/authorized_keys Please check in the screenshot that the location is correct and the permissions are […]

Categories
Development System & Network

SSH keys no longer work?

The Problem Trying to connect to my QNAP server from two different computers, which previously could connect via ssh without a password — but now a password is asked for each time. What went wrong, and how do I fix it? What I’ve tried I’ve rooted around for ideas and checked the following, all with […]

Categories
Development Linux Ubuntu

SSH / SFTP Permission denied (publickey)

I’ve added the following to my sshd_config Match Group sftponly ChrootDirectory /srv/sftpfolder ForceCommand internal-sftp #AllowTcpForwarding no PermitTunnel no X11Forwarding no I created “user” by useradd -g sftponly user mkdir -p /home/user/.ssh And then created authorized_keys in the users ssh folder. Permissions on /home/user/.ssh/ is 700 and on the authorized_keys file 600. But when I try […]

Categories
Development Linux

unable to login to my pi using my public IP

I would like to be able to login to my RasPi from external using ssh. I would also like to disable password login for that (only allow pulickeys instead) but I’m struggling. I’ve forwarded port 22 to my Pi’s IP, from the internal LAN, I can ssh to it just fine. I’ve added the public […]

Categories
Development System & Network Windows

SSH not using ssh_config on Windows 10

where ssh C:\Windows\System32\OpenSSH\ssh.exe C:\Program Files\OpenSSH-Win64\ssh.exe I have a ssh_config stored under C:\Users\my-username\.ssh\ssh_config. Within it I have the following: Host ucp.local AddKeysToAgent yes ForwardAgent no ForwardX11 no HostName ucp.local User web Port 22 IdentityFile D:\Projects\client\shop\keys\dev LogLevel DEBUG The ucp.local domain is mapped to a local IP and works as expected: Pinging ucp.local [192.168.33.10] with 32 bytes […]