Skip to content

Instantly share code, notes, and snippets.

View tonymuu's full-sized avatar

Tony Mu tonymuu

View GitHub Profile
@tonymuu
tonymuu / ssh-server-troubleshoot.md
Last active February 12, 2025 20:22
Setup new ssh server getting "connection closed by authenticating user" and "we will not send more packets" when using pubkey/rsa auth

I was trying to setup ssh server on fresh Xubuntu install. Both server and clients are on the same LAN. The client was able to find and talk to the server on the LAN. However, after talking and exchanging keys, the client always end up failing with the following steps (using debug mode)

debug1: Authentications that can continue: publickey,password
debug3: start over, passed a different list publickey,password
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
@tonymuu
tonymuu / bloom-filter.py
Last active October 5, 2020 16:37
2020-cs425-hw2-problem-1-bloom-filter
# Created by Tony Mu for UIUC Fall 2020 CS425 Distributed System Homework 2 Problem 1
M = 64
def h(i, x):
return (pow(i, 2*x) + x - i) % M
def run():
x = 3
h1 = h(1, x)
@tonymuu
tonymuu / #1.java
Last active March 10, 2017 02:39
Tony Mu's submission for Calendly's exercise
public class Solution {
public static void main(String[] args) {
fizzAndBuzz();
}
public static void fizzAndBuzz() {
// *a little* faster than the O(n) mod solution
int fizz = 3, buzz = 5;
@tonymuu
tonymuu / Solution.java
Created January 6, 2017 20:30
CitrusByte Problem
import java.util.*;
public class Solution {
public static void main(String []args){
// initialize
List<Node> list1 = new ArrayList<>();
List<Node> list2 = new ArrayList<>();
List<Node> list3 = new ArrayList<>();
List<Node> list4 = new ArrayList<>();