Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#added Ability to choose custom known_hosts file #906

Merged
merged 42 commits into from
Mar 4, 2021

Conversation

jamesstout
Copy link
Contributor

@jamesstout jamesstout commented Feb 24, 2021

Changes:

  • added ability to choose custom known_hosts file
  • added ability to specify that UserKnownHostsFile is set in one of your configs.
  • extra dropdown on the network pref pane.
  • new menu item (Help->SSH Tunnel Debugging Info) appears if connection is via SSH tunnel enabling you to see the commands used for the ssh connection.

Closes following issues:

Tested:

  • Processors:
    • Intel
    • Apple Silicon
  • macOS Versions:
    • 10.12.x (Sierra)
    • 10.13.x (High Sierra)
    • 10.14.x (Mojave)
    • 10.15.x (Catalina)
    • 11.x (Big Sur)
  • Xcode Version: 12.4 (12D4e)
  • Localizations:
    • English
    • Spanish
    • Other (please specify)

Screenshots:

Prefs

Screenshot 2021-02-25 at 7 14 10 AM

Help Menu

Screenshot 2021-02-25 at 7 14 59 AM

SSH Tunnel Debugging Info

Screenshot 2021-02-25 at 7 15 21 AM

Scanning configs for UserKnownHostsFile and parsing the file

2021-02-25 15 44 10

Additional notes:

Doesn't quite solve for #867

If you set a custom known_hosts file, SA creates a RW bookmark, adds it to prefs and then uses it in the command:

Used command: /usr/bin/ssh -v -N -S none -o ControlMaster=no -o ExitOnForwardFailure=yes -o ConnectTimeout=10 -o NumberOfPasswordPrompts=3 -o UserKnownHostsFile=/Users/james/.ssh/known_hosts

Checks it's writable etc.

@jamesstout jamesstout self-assigned this Feb 24, 2021
Copy link
Member

@Jason-Morcos Jason-Morcos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome job, @jamesstout! Haven't tried code locally yet, but looks like it should work very well. We'll just need to test thoroughly before release

Interfaces/Preferences.xib Show resolved Hide resolved
Interfaces/Preferences.xib Outdated Show resolved Hide resolved
* main:
  rm reverse2
  nil guards
  null guard
  bounds guards
  safeSetArray

# Conflicts:
#	Source/Other/CategoryAdditions/SPMutableArrayAdditions.h
#	Source/Other/CategoryAdditions/SPMutableArrayAdditions.m
* main:
  allow insertion of NULL into varchar fields of length < 4
this is for when we find things like:

Include ~/.ssh/ssh_conf
UserKnownHostsFile ~/.ssh/known_hosts

in a config file. We need to expand for bookmark generation.

Needs tests....
* main:
  Increment build version
  Increment app patch version
  fix some analyzer warnings
  tableSyntax unboxNull
  safeObjectAtIndex for primaryKeyFieldNames
  tidy
  tests for separatedIntoLinesByCharsetObjC
  expose separatedIntoLinesByCharsetObjC to objc
  save individually now splits on ;
  added separatedIntoLinesByCharset
  resetFilter calls toggleRuleEditorVisible and sets state of toggleRuleFilterButton
  expose toggleRuleFilterButton

# Conflicts:
#	Source/Controllers/Preferences/Panes/SPNetworkPreferencePane.h
#	Source/Other/CategoryAdditions/SPMutableArrayAdditions.h
#	Source/Other/Utility/SPPanelOptions.h
* main:
  check pref SPEditInSheetForLongTextLengthThreshold is actually an integer
  ensure we have valid value for editInSheetForLongTextLengthThreshold
  WIP

# Conflicts:
#	Interfaces/Preferences.xib
* main:
  needs to be on main loop
  SPTaskAdditions
  catch exceptions before MSACCrashes
  added sshProcessIDs array of pids launched by the tunnel

# Conflicts:
#	sequel-ace.xcodeproj/project.pbxproj
@Jason-Morcos
Copy link
Member

Jason-Morcos commented Mar 2, 2021

We may want to briefly hold on merging this until we get the release of 3.2.3 out. Then make this the banner feature for 3.3?
This may take quite a bit of testing which could delay 3.2.3 release which has some pretty key bug fixes

@jamesstout
Copy link
Contributor Author

We may want to briefly hold on merging this until we get the release of 3.2.3 out. Then make this the banner feature for 3.3?
This may take quite a bit of testing which could delay 3.2.3 release which has some pretty key bug fixes

sure .. no probs

@sjlehn
Copy link

sjlehn commented Mar 2, 2021

I'm happy to help test this once there's a build available, my workstation isn't current set up to build it.

I don't think this should close #867, although it will help.

* main:
  No Newer Release Available info alert
* main:
  added ByteCountFormatterExtension.swift to unit test target
  faster-stringForByteSize

# Conflicts:
#	sequel-ace.xcodeproj/project.pbxproj
@Kaspik
Copy link
Member

Kaspik commented Mar 4, 2021

3.2.3 is out, ready to go @Jason-Morcos ?

@Jason-Morcos Jason-Morcos merged commit 57f0bbf into main Mar 4, 2021
@Jason-Morcos Jason-Morcos deleted the custom-known-hosts branch March 4, 2021 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow User to Manage SSH known_hosts Allow Specifying Custom Known Hosts file
5 participants