How to keep OS X Terminal client connections alive when idle

There are three ways to keep your SSH client connection alive, even when it is idle and you are away doing something else: You can add the ServerAliveInterval command line option to each individual connection you setup, for example: ssh –o ServerAliveInterval=30 hostnameofservertoconnectto.com You can add the same option to your personal SSH config file in ~/.ssh/config […]

Continue reading


Swift 2 https with BASIC Authentication

In order to access a remote URL programatically in Swift 2…     func getData() { let username = “myUsername” let password = “myPassword” let url = NSURL(string:  “https://www.example.com/path/list”)! let credentials = NSURLCredential(user: username, password: password, persistence: NSURLCredentialPersistence.ForSession) let protectionSpace = NSURLProtectionSpace(host: url.host!, port: 443, `protocol`: url.scheme, realm: “myRealm”, authenticationMethod: NSURLAuthenticationMethodHTTPBasic) let credentialStorage = NSURLCredentialStorage.sharedCredentialStorage() credentialStorage.setCredential(credentials, […]

Continue reading