Brand new Mac (OS 12.0.1, M1 chipset) sshfs and Fuse installed from https://osxfuse.github.io. I do:
sudo sshfs -d mayacc#myhost.com:/home/myacc ~/mnt
The terminal hangs, can't ^C the process.
It works fine on my Intel Mac.
Any ideas what I've done wrong?
The hang is because the user mode component of SSHfs (the one the driver in the kernel calls out) hangs, and because the driver is blocked your process is stuck in an uninterruptible state (wherein it won't respond to signals, which your ^C is (SIGINT)).
It's not necessarily an Intel vs. M1 issue. It might be as simple as a connectivity issue between your M1 and (your)host.com. (there's very little info in your question to deduce what the problem is, but I'd suggest check the full stack, from basic ping, through TCP 22, through ssh keys in your ~/.ssh folder)
Related
This is a long story.
I use an old OSX 10.4.11 machine (Power PC) as a web server. Very low use.
It runs X11 at 1.1.3 (XFree86 4.4.0).
For several years I used X-forwarding to show log traffic on a newer Mac Intel machine (Mac mini). At some point after about 2006 this just stopped working. I have never tried to upgrade the 10.4.11 machine as it met and continues to meet my needs for a low cost Web server.
Meantime XQuartz has come and been through several new versions, as has MacOS. Currently I have MacOS 10.13.6 and XQuartz 2.7.11 on the Mac Mini. I am revisiting why the long-defunct X-forwarding sessions to OSX 10.4.11 stopped working.
I find I can do X-forwarding fine from my Linux 18.04 box, which was a surprise. I have spent a lot of time trying various approaches to resolving the issue. It occurs to me that the 10.4.11 setup may just be too old, and therefore incompatible. Hence my question: "mac osx 10.4.11 with x11 1.1.3 (XFree86 4.4.0) - is this compatible to do X-forwarding from Mac OS 10.13.6?".
Any comments will be much appreciated.
I am answering my own question.
I spent several days looking at logs from ssh -v -X user#hostname, with -vv and -vvv for more log info. I also tried the ssh -Y variants of that command.
Reading extensively from stackexchange and elsewhere, I restored and re-edited the ssh_config and sshd_config files on both server and client hosts several times, and coded shell scripts to restart sshd.
The insurmountable problem was that $DISPLAY was not being set up correctly on the client. This is what led to my question.
The only way I could get X-forwarding to work with my OSX 10.4.11 PPC client was:
1) ssh -f user#hostname /usr/X11R6/bin/xterm
then
2) run my local commands on the client from that window (nsu and nsu-go).
I also had to add the correct path to all my commands, including /usr/X11R6/bin for xterm as above, and ~/bin to my commands on the client.
The package I was working with was https://sourceforge.net/projects/nsu/ where detail changes are required.
I use local server enviroments on my mac. But every time I close the server by terminal process is still working so when I want to turn it on again I've got error that port I used previously is already occupied. So I need to find and kill that process with
netstat -vanp tcp | grep [PORT]
command which is very annoing and time-wasting. This is not related to any server technology since I've got the same problem using both Node.js and Ruby on Rails. It's something wrong with OSX. How can I fix that issue? I use OSX El Capitain version 10.11.6
Is there a way to sniff the USB port on a Mac? I've looked at libusb and #usblib but I can't find anything that works on the Mac.
I found a way, you'll need Wireshark's nightly build (I am using V2.5.0rc0). After you install it, you'll need to bring up the USB "interface":
sudo ifconfig XHC20 up
And after that you can use wireshark to sniff all the traffic in the XHC20 interface. When you finish, remember to turn the interface down:
sudo ifconfig XHC20 down
Source: aud-ios.
Beware when installing IOUSBFamily log. It has not been updated in a few years. The OS X versions must match or else all usb devices including builtin touchpad/keyboard could not work. If that does happen you must reload the proper kext manually from recovery:
https://discussions.apple.com/message/20152486#20152486
Here is the steps to reload from recovery:
I had the same issue after installing USB Prober from a wrong OS version on my machine. It installed without any warnings but it turned out that this includes IOSUSBFamily.kext kernel module that's not going to work on my machine and this disabled all the USB devices (which includes laptop's own keyboard and trackpad).
Here's how I fixed it, but please be extremely careful not to break your machine:
1) Hold CTRL+R and turn on your machine, this will boot into the "Recovery mode"
2) Open Terminal
3) Find out where is your original IOUSBFamily kernel extension and the one on the Macintosh HD are. Mine were here:
Original: /System/Library/Extensions/IOUSBFamily.kext
New one (broken): /Volumes/Macintosh\ HD/System/Library/Extensions/IOUSBFamily.kext
4) Move the broken module away:
$ mkdir /Volumes/Macintosh\ HD/Users/recovery-backup
$ mv /Volumes/Macintosh\ HD/System/Library/Extensions/IOUSBFamily.kext /Volumes/Macintosh\ HD/Users/recovery-backup
5) Copy back the original:
$ cp -a /System/Library/Extensions/IOUSBFamily.kext /Volumes/Macintosh\ HD/System/Library/Extensions/IOUSBFamily.kext
Reboot and it should be fixed.
You can use IOUSBFamily log. If you are on OSX 10.8.2, you'd probably want to try USB Prober included in Hardware IO Tools for Xcode, February 2012 (Apple Developer account required for both links), since the latest version of IOUSBFamily is for OSX 10.9.4.
Even now (in 2018) there are no newer releases than for 10.9.4, and they don't work in newer macOS releases.
So i am lookin for some source code to crash the mac kernel. I found crashme for debain linux but that does not work for the mac kernel. So i was wondering if anyone knows where i can find a command-line utility or some source code to invoke the mac kernel panic? This would be a huge help, thanks.
Apple has a tech note about how to do this.
The short way to do it is with this command, sudo dtrace -w -n "BEGIN{ panic();}", run from the terminal.
Update 2020: As noted by Wei Shen in the comments, you'll need to disable SIP to make this work in modern versons of macOS.
I recently updated crashme to work on Mac OS X Lion. You will need to download the source code from http://crashme.codeplex.com/ and compile it using Xcode command line tools. More details are in a answer to question 5085136. But note that crashme hasn't found any immediate kernel panics on the Mac yet. However, after running crashme on the native MacBook Pro, and running it in VirtualBox VM's on the same machine, one in an x86 PC-BSD and another in an x64 Centos, my Lion Kernel became unhappy enough that it threw a kernel panic a few minutes later as I was editing a file using the native Emacs. So crashme may have stumbled upon a kernel bug.
Go in terminal and type "killall kernel_task" it should force the computer into a panic without downloading any software. Just make sure you have everything saved before you try :D
although this requires a password it works every time
sudo halt
Does anybody know if you can setup remote connections in gedit(on mac os x snow leopard), so I don't have to keep ftp'ing up seperately.
I know it can be done on Ubuntu but can't figure out how to do it on a mac, if even possible.
An application independent solution for this would be sshfs on OSX through MacFUSE. sshfs is also available for Linux.
This sshfs with a GUI is also available via MacPorts.
There is also a possibility of automatic upload after each file save in Transmit and in Cyberduck (FTP programs).