Emacs | Come editare un file remoto con Emacs?

Installazione, configurazione e uso di Ubuntu come server: web, ftp, mail, news, proxy, dns e altro.
Scrivi risposta
Avatar utente
Antony_Ub
Scoppiettante Seguace
Scoppiettante Seguace
Messaggi: 359
Iscrizione: domenica 19 maggio 2013, 18:53

Emacs | Come editare un file remoto con Emacs?

Messaggio da Antony_Ub »

Ciao a tutti, oggi ho provato, volevo editare un file remoto con TRAMP in Emacs con il seguente comando dal mini-buffer:

Codice: Seleziona tutto

Ctrl-x Ctrl-f (comando per visitare un file)
/www.hostname.it:/path/del/file/da/editare


Ma non sono riuscito a stabilire alcuna connessione, Emacs mi ha restituito quanto segue:

Codice: Seleziona tutto

ssh: connect to host www.hostname.it port 22: Connection timed out

Process *tramp/ssh www.hostname.it* exited abnormally with code 255
Qualcuno sa che cosa vuol dire?
Probabilmente ho sbagliato qualcosa, cosa ne pensate?

P.S.: ho configurato TRAMP nel file .emacs con il seguente codice

Codice: Seleziona tutto

(setq tramp-default-method "ssh")
Ultima modifica di Antony_Ub il lunedì 19 agosto 2013, 21:33, modificato 1 volta in totale.
There are 10 kinds of people in the world. Those that understand binary, and those that don't.
Avatar utente
a323109
Entusiasta Emergente
Entusiasta Emergente
Messaggi: 1238
Iscrizione: venerdì 26 luglio 2013, 19:23
Desktop: Gnome
Distribuzione: Debian GNU/Linux 12 (bookworm)
Sesso: Maschile
Località: Area 51

Re: Emacs | Come editare un file remoto con TRAMP?

Messaggio da a323109 »

Dall'altra parte c'e' un firewall :D
Keep calm
and :asd:
Return fire
Avatar utente
Antony_Ub
Scoppiettante Seguace
Scoppiettante Seguace
Messaggi: 359
Iscrizione: domenica 19 maggio 2013, 18:53

Re: Emacs | Come editare un file remoto con TRAMP?

Messaggio da Antony_Ub »

Grazie della risposta :), quindi come dovrei fare?
There are 10 kinds of people in the world. Those that understand binary, and those that don't.
Avatar utente
a323109
Entusiasta Emergente
Entusiasta Emergente
Messaggi: 1238
Iscrizione: venerdì 26 luglio 2013, 19:23
Desktop: Gnome
Distribuzione: Debian GNU/Linux 12 (bookworm)
Sesso: Maschile
Località: Area 51

Re: Emacs | Come editare un file remoto con TRAMP?

Messaggio da a323109 »

Chiedi all'amministratore dell'altro computer che ti apra port 22
Keep calm
and :asd:
Return fire
Avatar utente
Antony_Ub
Scoppiettante Seguace
Scoppiettante Seguace
Messaggi: 359
Iscrizione: domenica 19 maggio 2013, 18:53

Re: Emacs | Come editare un file remoto con TRAMP?

Messaggio da Antony_Ub »

Ok, poi per editarlo mi verrà chiesta la password e nome utente giusto?
There are 10 kinds of people in the world. Those that understand binary, and those that don't.
Avatar utente
a323109
Entusiasta Emergente
Entusiasta Emergente
Messaggi: 1238
Iscrizione: venerdì 26 luglio 2013, 19:23
Desktop: Gnome
Distribuzione: Debian GNU/Linux 12 (bookworm)
Sesso: Maschile
Località: Area 51

Re: Emacs | Come editare un file remoto con TRAMP?

Messaggio da a323109 »

No.

Funziona cosi': Uno attiva un firewall e decide quali porte sono aperte e quali chiuse. Qui si chiama ip-tables, in Windows ha molti nomi, ma e' lo stesso. L'amministratore puo' decidere di aprire la porta 22 solo per il tuo IP. Quindi tu non metti nessuna password; la password la mette l'ammistratore del firewall e ti consente di comunicare attraverso quella specifica porta solo a te.

Quando uno configura un firewall se e' un minimo esperto mette delle regole in entrata e in uscita.
Keep calm
and :asd:
Return fire
Avatar utente
Antony_Ub
Scoppiettante Seguace
Scoppiettante Seguace
Messaggi: 359
Iscrizione: domenica 19 maggio 2013, 18:53

Re: Emacs | Come editare un file remoto con TRAMP?

Messaggio da Antony_Ub »

Ok io però ho un IP dinamico, come gestisco la cosa?
There are 10 kinds of people in the world. Those that understand binary, and those that don't.
Avatar utente
a323109
Entusiasta Emergente
Entusiasta Emergente
Messaggi: 1238
Iscrizione: venerdì 26 luglio 2013, 19:23
Desktop: Gnome
Distribuzione: Debian GNU/Linux 12 (bookworm)
Sesso: Maschile
Località: Area 51

Re: Emacs | Come editare un file remoto con TRAMP?

Messaggio da a323109 »

Eh allora devi aspettare la risposta di uno piu' esperto di me.

Non so neanche se e' possibile.

Comunque dal lato tuo non c'e' molto che puoi fare, solo chi ha configurato il firewall puo' lasciarti entrare e editare.

Cioe' se la porta e' chiusa e' chiusa.
Keep calm
and :asd:
Return fire
Avatar utente
Antony_Ub
Scoppiettante Seguace
Scoppiettante Seguace
Messaggi: 359
Iscrizione: domenica 19 maggio 2013, 18:53

Re: Emacs | Come editare un file remoto con TRAMP?

Messaggio da Antony_Ub »

Ok grazie, sai anche per caso se c'è un altro modo per editare un file remoto con emacs?
There are 10 kinds of people in the world. Those that understand binary, and those that don't.
Avatar utente
a323109
Entusiasta Emergente
Entusiasta Emergente
Messaggi: 1238
Iscrizione: venerdì 26 luglio 2013, 19:23
Desktop: Gnome
Distribuzione: Debian GNU/Linux 12 (bookworm)
Sesso: Maschile
Località: Area 51

Re: Emacs | Come editare un file remoto con TRAMP?

Messaggio da a323109 »

No mi spiace.

Sono appena arrivato da Windows, conosco ancora poco Ubuntu.

Molte cose sono simili a grandi linee, ma i particolari no.
Keep calm
and :asd:
Return fire
Avatar utente
Antony_Ub
Scoppiettante Seguace
Scoppiettante Seguace
Messaggi: 359
Iscrizione: domenica 19 maggio 2013, 18:53

Re: Emacs | Come editare un file remoto con TRAMP?

Messaggio da Antony_Ub »

Ok ti ringrazio molto per l'interesse! Grazie!
There are 10 kinds of people in the world. Those that understand binary, and those that don't.
Scrivi risposta

Ritorna a “Ubuntu su server”

Chi c’è in linea

Visualizzano questa sezione: 0 utenti iscritti e 1 ospite