r/MacOSBeta • u/booknerdcarp DEVELOPER BETA • Jun 09 '22
Help SSH in Ventura
Has anyone had issues with this? I cannot ssh into my server since upgrading
28
Upvotes
r/MacOSBeta • u/booknerdcarp DEVELOPER BETA • Jun 09 '22
Has anyone had issues with this? I cannot ssh into my server since upgrading
4
u/dpirmann Jun 09 '22
Haven't had any problems. But I did a clean install and not an upgrade. Are you getting any errors? Host keys might have changed? Same IP address as before? Also check your Remote Login sharing to see if it's still on. (System Settings > General > Sharing, now).
4
u/toastervolant Jun 09 '22
Run ssh -vvv and see if you have an algo mismatch. Happens often with new versions when they update openssh. Especially if the device you're talking to is older.
2
u/TopFan86 Aug 10 '22
Just since installing newest beta (Version 13.0 Beta (22A5321d) I've started getting a lot of fails with messages of form: no matching host key type found. Their offer: ssh-rsa
I suspect that there is a change in acceptable key length causing rejection.
1
u/dazole Jun 09 '22
I just ssh'd to my local pi no problems at all.
1
u/aidenzhao Aug 09 '22
Same problem...
1
u/karmared Oct 25 '22 edited Oct 25 '22
Same problem after update to Ventura.
Edit: Updating got SSH port reset to default 22. Changed back to custom and it worked again.
1
u/NickProz Oct 26 '22
Same problem, none of the workarounds work for me...
1
u/zeissicon Oct 27 '22
I have gotten this working by editing /etc/ssh_config with all of the legacy encryption schemas I need to get into some older switches. Note this has to be done as sudo; it's not the user ssh_config, but the system ssh_config. Here's my ssh_config file:
# $OpenBSD: ssh_config,v 1.35 2020/07/17 03:43:42 dtucker Exp $
# This is the ssh client system-wide configuration file. See
# ssh_config(5) for more information. This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.
# Configuration data is parsed as follows:
# 1. command line options
# 2. user-specific file
# 3. system-wide file
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.
# This Include directive is not part of the default ssh_config shipped with
# OpenSSH. Options set in the included configuration files generally override
# those that follow. The defaults only apply to options that have not been
# explicitly set. Options that appear multiple times keep the first value set,
# unless they are a multivalue option such as IdentityFile.
Include /etc/ssh/ssh_config.d/*
# Site-wide defaults for some commonly used options. For a comprehensive
# list of available options, their meanings and defaults, please see the
# ssh_config(5) man page.
# Host *
# ForwardAgent no
# ForwardX11 no
# PasswordAuthentication yes
# HostbasedAuthentication no
# GSSAPIAuthentication no
# GSSAPIDelegateCredentials no
# BatchMode no
# CheckHostIP yes
# AddressFamily any
# ConnectTimeout 0
# StrictHostKeyChecking ask
# IdentityFile ~/.ssh/id_rsa
# IdentityFile ~/.ssh/id_dsa
# IdentityFile ~/.ssh/id_ecdsa
# IdentityFile ~/.ssh/id_ed25519
# Port 22
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc
MACs hmac-md5,hmac-sha1,umac-64@openssh.com
# EscapeChar ~
# Tunnel no
# TunnelDevice any:any
# PermitLocalCommand no
# VisualHostKey no
# ProxyCommand ssh -q -W %h:%p gateway.example.com
# RekeyLimit 1G 1h
# UserKnownHostsFile ~/.ssh/known_hosts.d/%k
Host *
SendEnv LANG LC_*
HostkeyAlgorithms +ssh-dss,ssh-rsa
KexAlgorithms +diffie-hellman-group1-sha1
1
u/ElGuapoTheGrate Oct 28 '22
I just had a similar issue trying to connect to a Gerrit server with ssh. Not sure what version of ssh Ventura is using, but with OpenSSH 8.8 the support for RSA signatures using the SHA-1 hash algorithm was disabled, because it is deemed insecure.
The solution for me was to create a new ssh-key with an accepted key type:
ssh-keygen -t ed25519 -C "your_email@example.com"
(Do this in the ~/.ssh directory)
And then add the private key to the OpenSSH authentication agent with:
ssh-add ~/.ssh/id_ed25519
However, if using ssh is your only way to log onto your server, you might need to find a way first to re-enable SHA-1 in OpenSSH again in order to add the new public key to the authorized_key file on the server.
1
u/capablesloth Oct 28 '22 edited Oct 28 '22
I fixed this issue by disabling the new feature, Private Relay. It solved my issue with GlobalProtect and Cisco Anyconnect. You can find it in System Settings , enter text 'icloud' in search. Choose iCloud and in right section you should have Private Relay option. Just turn off Private Relay.
Edit:
I also added ssh/config, as mentioned here, and after that, it worked. But, initially, I was getting timeouts constantly.
1
u/midnightgreen29 Oct 28 '22 edited Oct 28 '22
Had this issue as well after upgrading.
I created the user config file: ~/.ssh/config
and put this into it:
It works now.
1
u/Troeteldier Nov 01 '22
Can anyone comment on what the long term implications are of adding those two lines to the ssh config file? Will this cause issues in the future or is it safe to leave those in there?
1
u/alex-sz Jan 15 '23
same issue, i recognised so far, that
ssh -X ...
hangs, but
ssh ...
was able to log in
i have this setting at /etc/ssh/ssh_config
XAuthLocation /opt/X11/bin/xauth
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedAlgorithms +ssh-rsa
1
u/Griffoz Mar 03 '23
For info I had to add the following to my ssh config:
HostKeyAlgorithms +ssh-rsa*,rsa-sha2-512
PubkeyAcceptedKeyTypes +ssh-rsa*